Page 1 of 1

Using one of the Copy Conditions out of given 2 conditions

PostPosted: Wed Jun 27, 2012 3:48 pm
by gauravkb33
Hi,

I have a jcl in which there are two copy condition codes like this :-

COPY
TEXT,10,4,C,EQ,'1234',OR,
TEXT,10,4,C,EQ,'3456'

COPY
TEXT,10,4,C,EQ,'2345',OR,
TEXT,10,4,C,EQ,2111'

I want to use one of the copy conditions to work at a time. The jcl in which i've to code this is a scheduled one,so i dont want to make changes everytime a different condition code is specified. Please tell me how should I proceed.

Earlier, I was thinking of doing it with the help of a ps file, specifying both condition codes. But I am not sure of that how to proceed. Please help me.

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Wed Jun 27, 2012 5:11 pm
by prino
Since when does JCL have "COPY" statements?

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Wed Jun 27, 2012 5:36 pm
by NicC
Yup, that is not JCL. JCL begins with at least 1 forward slash (/) usually 2 (//)

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Wed Jun 27, 2012 8:19 pm
by dick scherrer
Hello,

If you post the complete job you submitted (well, the problem step anyway), someone may be able to provide more useful replies. . .

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Fri Jun 29, 2012 12:26 pm
by gauravkb33
dick scherrer wrote:Hello,

If you post the complete job you submitted (well, the problem step anyway), someone may be able to provide more useful replies. . .


Thanks Dick.

Actually my SYSIN has two copy conditions as mentioned above. Both will not work simultaneously. I want to write it in such a way that it one of the two will work on first month and the second one will work on the next month.

//SYSIN DD *
COPY
CODE,6,4,C,EQ,'8316' OR
CODE,6,4,C,EQ,'8355'

COPY
CODE,6,4,C,EQ,'8376' OR
CODE,6,4,C,EQ,'8350'
//*

Please help me. I hope now I am clear.

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Fri Jun 29, 2012 12:33 pm
by NicC
I have no idea what program is using those control cards so I cannot say what it will accept. Assuming it does not have an if/then facility then what you want to do cannot be done in one step. Suggest you have two jobs one to be scheduled once a month the other to be scheduled on the other days. It is simpler, it is clearer and you do not have to mess about with multiple steps conditionally executed.

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Fri Jun 29, 2012 7:26 pm
by dick scherrer
Hello,

Please help me. I hope now I am clear
Not clear yet. . .

As requested earlier, it may help us help you if you post the complete step (JCL and Control Statements).

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Sun Jul 01, 2012 1:40 pm
by Anuj Dhawan
Well, are you executing file-Aid or IBM File Manager or some other such utility program in batch?

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Wed Jul 18, 2012 1:23 pm
by gauravkb33
My entire JCL is as follows :-

//STEP01 EXEC PGM=UCANDU
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=GAURAV.DATA, ( THIS IS THE INPUT FILE)
// DISP=SHR
//SYSUT2 DD DSN=YYY0Q45.MAY12.T8316.T8355, ( THIS IS THE OUTPUT FILE CREATED BASED ON COPY CONDITION)
// DISP=(,CATLG),
// UNIT=MSTR,SPACE=(140,(180000,26000),RLSE),LRECL=140,AVGREC=U,
// RECFM=FB
//SYSIN DD *
COPY
//*

The copy control card is like this :-

COPY
CODE,6,4,C,EQ,'8316' OR
CODE,6,4,C,EQ,'8355'

COPY
CODE,6,4,C,EQ,'8376' OR
CODE,6,4,C,EQ,'8350'

I want the output file such that it contains either the records with '8316' or '8355' OR records with '8362' or '8367'

Re: Using one of the Copy Conditions out of given 2 conditio

PostPosted: Wed Jul 18, 2012 3:20 pm
by NicC
No sign of a utility program called UCANDO on the internet. Who supplies it? or is it an in-house program? If in-house how do you expect anyone that does not work at your place to know anything about it? If it is a vendor product then do the following in sequence: ask your co-workers, ask your support people, ask the vendor. If no luck then try and explain what you are doing and we might be able to point you in an alternative direction.