by jose » Wed Jan 14, 2009 5:04 pm
Thank you very much for for hints to solve my problem, i'll try to explain you what i intend to do:
In a COBOL program i get from a file: the action to take, the name of the source file and the name of the target file. I evaluate the action to take, and I call the necessary JCL to execute the action. For instance a “copyâ€:
In the JCL “called†from the COBOL program I have an issue of 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 target 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.
//STEPB EXEC=UPDATE
…
…
// IF (STEPA.RC LE 8)
//STEPC EXEC PGM=ALLOK
// ELSE
//STEPD EXEC PGM=ERROR
// ENDIF
thank you in again for your help