Many commands have parameters that accept multiple values. For example, STRJRNPF:
STRJRNPF FILE(FILE1 FILE2 FILE3) JRN(MYJRN)
If I was to write a CL program that needed to call STRJRNPF, I would have to have a separate CL field for each filename in the FILE parameter:
STRJRNPF FILE(&FILE1 &FILE2 &FILE3) JRN(MYJRN)
If I was to write a CL program where the number of files I needed to start journalling on was not known (the CL program is passed a list of one or more filenames)? Is there a way to specify a variable length list of filenames for the FILE parameter?
To clarify, I do not actually want to do this, and I know that for this example I could call it in a loop or use QCMDEXC with a command string. I just want to know if it is possible to specify a command in a normal CL source line with a variable length list of values for a parameter.
STRJRNPF FILE(FILE1 FILE2 FILE3) JRN(MYJRN)
If I was to write a CL program that needed to call STRJRNPF, I would have to have a separate CL field for each filename in the FILE parameter:
STRJRNPF FILE(&FILE1 &FILE2 &FILE3) JRN(MYJRN)
If I was to write a CL program where the number of files I needed to start journalling on was not known (the CL program is passed a list of one or more filenames)? Is there a way to specify a variable length list of filenames for the FILE parameter?
To clarify, I do not actually want to do this, and I know that for this example I could call it in a loop or use QCMDEXC with a command string. I just want to know if it is possible to specify a command in a normal CL source line with a variable length list of values for a parameter.
Comment