View previous topic :: View next topic |
Author |
Message |
pzmohanty Beginner
Joined: 20 May 2004 Posts: 97 Topics: 43 Location: hyderabad, India
|
Posted: Tue Jun 22, 2004 5:49 am Post subject: difference between LASTCC & MAXCC in IDCAMS |
|
|
hi all,
we can use LASTCC or MAXCC in Control information with IF or SET in IDCAMS.
But, can anyone please help me out in having exact distinction between these two.
Thanx in advance. _________________ Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Jun 22, 2004 6:14 am Post subject: |
|
|
Pzmohanty,
LASTCC is set by the processor at the completion of each functional command (Repro, Define cluster...).
MAXCC is the highest value of LASTCC thus far encountered.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
pzmohanty Beginner
Joined: 20 May 2004 Posts: 97 Topics: 43 Location: hyderabad, India
|
Posted: Tue Jun 22, 2004 6:27 am Post subject: |
|
|
hi Kolusu,
Thanks for the prompt reply ...........
But can u please make the things more clearer.
are the LASTCC or MAXCC only linked with return codes with in the same IDCAMS Control Card.
if my step previous to IDCAMS is anything other than IDCAMS , then also can i use LASTCC or MAXCC in IDCAMS step to control the previous return code ( i.e RETURN CODE of previous step).
Thanx....... _________________ Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Jun 22, 2004 7:08 am Post subject: |
|
|
Pzmohanty,
Quote: |
are the LASTCC or MAXCC only linked with return codes with in the same IDCAMS Control Card.
|
No they can be in different steps
Code: |
//STEP0100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE 'AN NON EXISTING DATASET'
/*
//STEP0200 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//FILE01 DD DSN=AN EXISTING DATASET WITH ATLEAST 1 RECORD,
// DISP=SHR
//SYSIN DD *
PRINT INFILE(FILE01) CHARACTER COUNT(1)
IF LASTCC = 4 THEN DELETE 'USELESS DATASET'
/*
|
In the above job, the first step ends with a return code of 8 since the dataset is not present.
In step0200 we first print 1 record and if the file is empty , then we issue another command to delete some useless dataset
Now the maxcc of the job is 8 whereas the lastcc of the job is 0
Quote: |
if my step previous to IDCAMS is anything other than IDCAMS , then also can i use LASTCC or MAXCC in IDCAMS step to control the previous return code ( i.e RETURN CODE of previous step).
|
Sure you can
Code: |
//STEP0100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE 'AN NON EXISTING DATASET'
/*
//STEP0200 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//FILE01 DD DSN=AN EXISTING DATASET WITH ATLEAST 1 RECORD,
// DISP=SHR
//SYSIN DD *
IF LASTCC = 4 THEN DELETE 'USELESS DATASET'
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|