Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Infor / Lawson Platforms
S3 Systems Administration
System Date in Job Parm
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
HireIQ
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5264
People Online:
Visitors:
89
Members:
0
Total:
89
Online Now:
New Topics
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
S3 Systems Administration
ADFS certificate - new cert
12/3/2024 9:38 PM
The certificates on the windows boxes expired and
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
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
Infor / Lawson Platforms
S3 Systems Administration
System Date in Job Parm
Please
login
to post a reply.
7 Replies
1
Subscribed to this topic
27 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
Roger French
Veteran Member
Posts: 549
5/16/2007 11:48 AM
I saw an answer to this question on another board a few years ago.. but now I need to revisit it.
I want to run a daily HR155 job and the History Date is a required field. If I set up the job in jobdef and then recdef I will need to hand key in a static History Date.
How can I set it up so that for each day I run the job (scheduled through recdef) the job parameter screen will dynamically pick up the current system date and use that for the History Date? I know this question's been asked before. My initial thought is that the program will need to be modified to populate the History Date field with the current system date.
Thanks in advance for your help,
-Roger
mondrar
Advanced Member
Posts: 35
5/16/2007 10:29 PM
Split
I want to do the same thing in LP180. Any ideas anyone...
John Henley
Posts: 3351
5/18/2007 12:27 PM
Split
Off the cuff, I can think of three ways to do this:
1. Create a shell or perl script that calls jobdump/jobload (or ujobdump/ujobload) to dump/update the date as part of the parameters in the job definition.
2. Modify the desired job's COBOL code to change the desired date to the current system date. This introduces two problems:
a) Assumes the program is always being run as part of a recurring job; what if the program is being run for a special case and NOT as a non-recurring job and you REALLY don't want to do to substitute the date?
b) It's a maintenance headache--you now have (hopefully) a forked version of a standard Lawson program, which you have to maintain as part of CTP/MSP maintenance cycle.
3. Create a separate COBOL program that runs before the desired recurring job(s). It has as parameters the username, jobname, step#, and byte position within JOBSTP-PARAMS for the desired date. That program would PERFORM 900-LOAD-JOB, change the date, then PERFORM 900-CREATE-JOB to modify the job record. This approach is general-purpose (i.e. you can use it for many different jobs/programs) and doesn't introduce the maintenance issues with option #2.
Sam Simpson
Veteran Member
Posts: 239
5/18/2007 3:17 PM
Split
I remember changing the .scr file and put @TD as the default value for dates. So if
the parameter field is blank then the default is the system date/time. Hope this helps.
John Henley
Posts: 3351
5/18/2007 5:47 PM
Split
That's an interesting idea; the problem though may be that you have to do that change AFTER the recurring job is added. Otherwise the date field will be filled with the current system date on the day the job is added, and will remain that way unless you manually change the parameters field on the job definition.
Nabil
Veteran Member
Posts: 61
9/8/2016 9:24 PM
Split
Was there any good answer to this question? We'd like to use similar functionality and didn't know if Lawson provided an easy way to code a date parameter to today's date for a scheduled batch job.
JimY
Veteran Member
Posts: 510
9/13/2016 10:40 AM
Split
The only way I was able to do this was to modify the program to grab the system date and populate the parameter field with it. You may also be able to do it through IPA, but I have not attempted it. You might check in the Lawson Process Flow forum to see if anyone has accomplished it and posted their results.
Any ideas?
Basic Member
Posts: 20
9/15/2016 10:35 PM
Split
There is a better way in using curl and scripting it out instead of modifying it in 4gl.
#!/usr/bin/ksh
OK="
Job Changed
"
DMPFILE='hahaha.dmp'
JOB_UID=lawson
JOB_PWD=iwonttell
SERVERNAME=mywonderlandurl
DATE=`date +%Y%m%d`
curl -A 'Mozilla Firefox/2.0.0.17' --dump-header ${DMPFILE} -d "_ssoUser=$JOB_UID&_ssoPass=$JOB_PWD&_action=LOGIN&_fromLoginPage=TRUE&_language&_ssoOrigUrl=http://${SERVERNAME}/lawson/portal/logondone.htm" http://${SERVERNAME}/sso/SSOServlet
MSG=$(curl -A 'Mozilla Firefox/2.0.0.17' -L -b ${DMPFILE} -d "_PDL=PROD&_TKN=WH110&_LFN=ALL&_RTN=DATA&_TDS=IGNORE&_OUT=XML&_EVT=CHG&FC=C&JOB-NAME=WH110&USER-NAME=$JOB_UID&COMPANY=1&LOCATION=1&ALLOCATE-DT=${DATE}&_EOT=TRUE" http://${SERVERNAME}/servlet/Router/Transaction/Erp? 2> /dev/null |grep "
")
if [[ "${OK}" = "${MSG}" ]]
then
echo "Success"
else
echo "Failed"
echo $MSG
fi
rm ${DMPFILE}
echo "Ok. Don't you think you should send a walmart gift card to the person who write this?"
Please
login
to post a reply.