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

 2 Replies
 0 Subscribed to this topic
 17 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: 476
    Veteran Member
      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: 3353
        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