Using one of the Copy Conditions out of given 2 conditions



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Using one of the Copy Conditions out of given 2 conditions

Postby gauravkb33 » Wed Jun 27, 2012 3:48 pm

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.
gauravkb33
 
Posts: 9
Joined: Mon Jun 04, 2012 1:28 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby prino » Wed Jun 27, 2012 5:11 pm

Since when does JCL have "COPY" statements?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

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

Postby NicC » Wed Jun 27, 2012 5:36 pm

Yup, that is not JCL. JCL begins with at least 1 forward slash (/) usually 2 (//)
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby dick scherrer » Wed Jun 27, 2012 8:19 pm

Hello,

If you post the complete job you submitted (well, the problem step anyway), someone may be able to provide more useful replies. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby gauravkb33 » Fri Jun 29, 2012 12:26 pm

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.
gauravkb33
 
Posts: 9
Joined: Mon Jun 04, 2012 1:28 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Fri Jun 29, 2012 12:33 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby dick scherrer » Fri Jun 29, 2012 7:26 pm

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).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby Anuj Dhawan » Sun Jul 01, 2012 1:40 pm

Well, are you executing file-Aid or IBM File Manager or some other such utility program in batch?
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

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

Postby gauravkb33 » Wed Jul 18, 2012 1:23 pm

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'
gauravkb33
 
Posts: 9
Joined: Mon Jun 04, 2012 1:28 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Wed Jul 18, 2012 3:20 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post