MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

difference between LASTCC & MAXCC in IDCAMS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
pzmohanty
Beginner


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Tue Jun 22, 2004 5:49 am    Post subject: difference between LASTCC & MAXCC in IDCAMS Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Jun 22, 2004 6:14 am    Post subject: Reply with quote

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 - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pzmohanty
Beginner


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Tue Jun 22, 2004 6:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Jun 22, 2004 7:08 am    Post subject: Reply with quote

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 - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group