Page 1 of 1

is ok all these JCL?

PostPosted: Thu Jan 29, 2009 5:20 pm
by jose
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!!!

Re: is ok all these JCL?

PostPosted: Fri Jan 30, 2009 12:54 am
by dick scherrer
Hello,

i can not check it out by my self
You need to get to where you can. . .

I believe there are enough issues/problems that you might consider starting over with this exercise. We can help with technical questions here, but we are unable to provide teaching - it is simply too big a task for us to handle.

Where did the specifications for this requirement originate? Who introduced the terms "primary jcl" and "secondary jcl"? How does "get back to the main jcl" happen?

How will the "3 parameters" actually be used by the cobol program?

will these work correctly?
As posted, i would say not. Once a better definition of the requirement is understood and you have a system where you can code/test, you should be able to implement what you need.