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:
Chris Radcliffe
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5187
People Online:
Visitors:
211
Members:
0
Total:
211
Online Now:
New Topics
S3 Customization/Development
Cobol - Extract Current Time
4/24/2024 7:21 PM
How do you extract just the Current System Time in
Lawson Landmark
LPL INSTR Functions
4/5/2024 8:32 PM
I'm writing a simple report using the Create R
Infor SCM
Translating 856 to get the ~ REF^CN^ field
4/3/2024 8:24 PM
We are trying to get the tracking number which is
IPA/ProcessFlow
Sample XML file create Flow
4/3/2024 3:43 PM
Hello everyone, I am new to creating XML files
Lawson S3 HR/Payroll/Benefits
bn105 error message
3/26/2024 6:40 PM
I need to change some of the set ups in our Life I
IPA/ProcessFlow
IPA executing Job
3/13/2024 7:08 PM
New to the IPA world and was wondering, can an IPA
Lawson S3 HR/Payroll/Benefits
Life Age Reduction on benefits plans
3/12/2024 7:15 PM
For our optional life we have an age based coverag
Lawson S3 HR/Payroll/Benefits
BN53.1 Add-In
3/7/2024 3:31 PM
We are migrating to Solstice. They require a
Lawson Business Intelligence/Reporting/Crystal
Domain Name Change
3/5/2024 7:45 PM
Our domain name needs to change and was hoping I c
S3 Customization/Development
Cobol calling Shell Script
2/29/2024 1:27 PM
Has anyone created or modified a Lawson Cobol prog
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1348
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
S3 Systems Administration
System Date in Job Parm
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
Roger French
Veteran Member
Posts: 545
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
I want to do the same thing in LP180. Any ideas anyone...
John Henley
Senior Member
Posts: 3348
5/18/2007 12:27 PM
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
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
Senior Member
Posts: 3348
5/18/2007 5:47 PM
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
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
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
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?"
You are not authorized to post a reply.