Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
S3 Customization/Development
900-submit-job blocking?
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Zac Shields
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5210
People Online:
Visitors:
439
Members:
0
Total:
439
Online Now:
New Topics
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Lawson S3 Procurement
RQ13 Approval Info
10/17/2024 2:12 PM
When a Requisition is approved on RQ13, what table
S3 Customization/Development
Read and Write CSV file COBOL
10/9/2024 2:53 PM
Does anyone have a quik example of a program that
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1372
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Integration / Customization
S3 Customization/Development
900-submit-job blocking?
Please
login
to post a reply.
3 Replies
0
Subscribed to this topic
17 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
Chris
Basic Member
Posts: 8
8/29/2011 5:55 PM
FYI - new to lawson, so learning the ropes.
I'm writing a COBOL program to read in 1 or more files and for each file, kick of a batch job, of another program, that I defined via jobdef. Since each file will be processed by the same job, my thought was to copy using the work file, using 900-movefiles, to a working directory and file-name that I defined in the job-def, and then use 900-load, 900-create, and 900-submit to run the job, and then when the job was over, repeat the process for each of the files that might exist...hope that all makes sense.
My issue, however, would be if the 900-submit call is not blocking and my COBOL program would not know when the job ends, which would result in my code overwriting each of the previous submitted job's workfiles (which I moved into place with the previous 'loop').
Can anyone confirm whether the 900-submit-job call is blocking or not? NOTE: according to the API, I saw the 900-create-and-submit was not blocking.
If 900-submit is not blocking, anyone have another idea how to submit the same job multiple times on different files like I'm trying to do?
Thanks!
-Chris
John Henley
Posts: 3353
8/29/2011 6:58 PM
900-SUBMIT will just submit to the job queue and has no knowledge of the job's completion, etc.
If you know how many files there are, and it doesn't change, you can create a multi-step job using jobdef that runs your cobol program as many times as needed for the various files. If you don't know until run-time, you could create a new job for each file, passing/setting the input file location/name as one of the job parameters.
Chris
Basic Member
Posts: 8
8/31/2011 11:19 AM
Hi John,
Thanks for confirming what I suspected. So I'm onto the next options -- you mentioned setting the input file as a parameter, which is what I'd like to do. I've figured how to create a job, set the jobreq parameters and the few jobstep parameters, but none of the parameters appear to be related to the inputfile. My program is going to create multiple jobs (unknown how many each run) for Lawson's PR530. Is there a way to not touch PR530 and set the inputfile directory/path as a parameter without touching PR530?
Thanks again!
-Chris
Sampath S
Basic Member
Posts: 17
9/30/2011 8:05 AM
Hi Chris,
You can create a UNIX script and submit multiple jobs for the same program. Here is the sample script which you build;
1. Check if the input file is avilable and if present then copy file-1 into some backup folder and then as defined below submit the job and for any errors it will send an email to you and exit from the script.
2. Similarly you can submit submit same program for other files.
3. Always check if the file is present in the respective and then go for further processing.
export B3="/$LAWDIR/prod/work/FILENAME"
export B2="/$LAWDIR/prod/work/BACKUP"
if [ -f $B3/FILE-1 ]
then
cp $B3/FILE-1K $B2/FILE-1.$(date +%m%d%y)
echo 'File Archieved and Copied successfully
fi
wtsubmit -n lawson-user-name job-id
jqstatus -w | grep -i "needs recovery" | grep -i "program-id" > ErrFile
if [ -s ErrFile ]
then
cat ErrFile | mail -s "program-id in Needs Recovery" $chris@aaa.com
echo 'program-id job in needs recovery'
fi
exit
Please
login
to post a reply.