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

Sort:
You are not authorized to post a reply.
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: 469
    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
      Senior Member
      Posts: 3348
      Senior Member
        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
        You are not authorized to post a reply.