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
//STEPD EXEC PGM=ERROR
will these work correctly?, i can not check it out by my self, thank you very much!!!