ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

JOB parameter

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JOB parameter

    This works when entered from the command line:
    CHGSPLFA PR025RF 514834/PSOMERS/QPADEV0004 1 PRTSEQ(*NEXT) RESTART(1)

    This following CL program fails with the message CPD0078: Value '514834/PSO' for parameter JOB not a valid name:
    PGM
    DCL VAR(&JOB_NAME) TYPE(*CHAR) LEN(27) +
    VALUE('514834/PSOMERS/QPADEV0004')
    CHGSPLFA PR025RF &JOB_NAME 1 PRTSEQ(*NEXT) +
    RESTART(3)
    ENDPGM

    What am I missing?

    The CL program will be called from an RPG program with the JOB parameter being passed.

  • #2
    Each of the three pieces of the job identifier has to be in its own variable. Instead of one &JOB_NAME variable, use 3 variables for job name, user, and job number.

    Comment

    Working...
    X