Is there a way to access a Lawson jobname in a shell script?

 2 Replies
 0 Subscribed to this topic
 18 Subscribed to this forum
Sort:
Author
Messages
wilcoxmad
Veteran Member
Posts: 87
Veteran Member
 In a COBOL program you can use the Lawson defined variable "CRT-JOB-NAME"  to refrence the job that is calling the program.  Is there a way to do the same in a script that is called by a user defined Lawson form?

I need to know the jobname of a multi-step job that runs a program and then runs a script to copy a printfile from that program. In order to copy the printfile, I need to know the jobname because it is part of the path where the printfile resides.

Ragu Raghavan
Veteran Member
Posts: 477
Veteran Member
New Poster
New Poster
Congrats on posting!
Engaged Poster
Engaged Poster
Wow, you're on a roll!
Avid Poster
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
Is the script called from a 4GL code ? You can pass CRT-JOB-NAME as a parameter to the script when doing a
CALL "system" USING
John Henley
Posts: 3364
New Poster
New Poster
Congrats on posting!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
You can also try something like this in your script:
myjobname=`rngdbdump -tn gen queuedjob -f JobName -v ProcessId=${PPID}`
Thanks for using the LawsonGuru.com forums!
John