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:
BDell92
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5275
People Online:
Visitors:
454
Members:
0
Total:
454
Online Now:
New Topics
Lawson S3 Financials
Applying credits to open AP invoices
4/28/2025 1:26 PM
Hello, I am new to the Lawson system and after ru
Lawson S3 Financials
Lawson APIA
4/28/2025 1:22 PM
Has anybody recently installed Lawson's APIA m
Lawson S3 Procurement
Tolerance Settings
3/31/2025 2:01 PM
I've been trying to set a tolerance for some t
Dealing with Lawson / Infor
Printing Solutions other than MHC
3/27/2025 1:00 PM
What are others using for printing solutions besid
Lawson S3 Procurement
Green check marks in Lawson 9.0.1
3/20/2025 4:55 PM
Hi, How to remove green check mark on items when o
Lawson S3 HR/Payroll/Benefits
Pay Rate History to Show All Positions
2/26/2025 3:34 PM
Does anyone know how to modify payratehistory.htm
Infor CloudSuite
How to build a Pre-Prod tenant
2/7/2025 1:28 AM
After we finished our implementation and ended our
Lawson S3 Procurement
Browser issue with RQC Shopping
1/28/2025 5:49 PM
Since the recent Chrome/Edge updates, our RQC shop
Lawson S3 Procurement
S3-Procurement New Company
1/22/2025 10:38 PM
My Accounting Department has created a new Company
S3 Customization/Development
JUSTIFIED RIGHT
1/15/2025 7:41 PM
Is there a way in Lawson COBOL to make a character
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
1375
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: 3351
8/29/2011 6:58 PM
Split
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
Split
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
Split
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.