Good morning every body,
i need your help to know if i can make it work, i'm a "begginer" in JCL and i can not check it by my self this:
I have a “main JCL†which executes:
1.- a COBOL program to get three parameters: the action to take, the name of the source file and the name of the target file (i'll pass these values to the main JCL)
I get back to the “main JCLâ€, evaluates the action to take, and I call another JCL to execute the action. For instance a “copyâ€:
2.- In the “secondary JCL called†I have issued a LISTCAT to know whether both files exists or not. If Return Code greater than 8, the file doesn’t exit (accordingly with “the copy actionâ€, the source file must exist, but must not exist for the target file)
If verything is OK:
SOURCEFILE ïƒ parameter for the source file name, which has been gotten in the cobol program
TARGETFILE ïƒ parameter for the target file name, which has been gotten in the cobol program
//STEPA EXEC=IEBGENER, PARM=’&SOURCEFILE,&TARGETFILE’
…
…
//SYSUT1 DD DSN=&SOURCEFILE,DISP=SHR
//SYSUT2 DD DSN=&TARGETFILE,DISP=...
Depending on the Return Code I’ll invoke a COBOL program to make an annotation of correct ending, or the failure.
…
…
// IF (STEPA.RC LE 8)
//STEPC EXEC PGM=ALLOK
// ELSE
//STEPD EXEC PGM=ERROR
// ENDIF
will these work correctly?, i can not check it out by my self, thank you very much!!!