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 

Return codes of REPRO

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


Joined: 19 May 2004
Posts: 51
Topics: 25
Location: My House

PostPosted: Fri Mar 04, 2005 12:33 pm    Post subject: Return codes of REPRO Reply with quote

Hi all,

In my site there is a step which copies the contents of a VSAM file to a Flat file. Repro command is used for this. Whenever the Input VSAM file is empty it is giving the Return code of 12.

We are planning to override the condition code of 12 with 4 if the file is empty as follows.

Code:
     REPRO -               
          INFILE(INFILE) - 
          OUTFILE(OUTFILE) 
           IF LASTCC EQ 12 THEN SET MAXCC=4


I want to know, in which other case the repro command will give return code 12.

I know that we can introduce a new step to check if the file is empty (by copying 1 record) and skip the repro command, but still I want to do the above said way.

Thanks,
YSMVS.
_________________
Thanks,
YSMVS
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Mar 04, 2005 2:32 pm    Post subject: Reply with quote

YSMVS,

There are many instances when you can get a return code of 12 on Repro command.

ex: 1 when the output dataset does not exist

Code:
//STEP0100 EXEC PGM=IDCAMS                         
//*                                                 
//SYSPRINT DD  SYSOUT=*                             
//SYSOUT   DD  SYSOUT=*                             
//SYSIN    DD  *                                   
  REPRO IDS(SOME.EXISTING.VSAM FILE) -       
        ODS(NON EXISTING VSAM FILE) REPLACE
/*                                                 


ex: 1 Copying a Vsam file which is not INITIALIZED

Code:

//STEP0100 EXEC PGM=IDCAMS                         
//*                                                 
//SYSPRINT DD  SYSOUT=*                             
//SYSOUT   DD  SYSOUT=*                             
//SYSIN    DD  *                                   
  REPRO IDS(NOT INIT VSAM FILE) -       
        ODS(SOME EXISTING VSAM FILE) REPLACE
/*                                                 


Also check this topics which discuss about checking an empty file.

http://www.mvsforums.com/helpboards/viewtopic.php?t=27&highlight=empty


http://www.mvsforums.com/helpboards/viewtopic.php?t=2600&highlight=vsamemt

Hope this helps...

Cheers

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


Joined: 07 Jun 2003
Posts: 18
Topics: 7

PostPosted: Tue Mar 15, 2005 3:38 pm    Post subject: Reply with quote

If we have Records out of sequence(not in sorted order) also, we will be getting Return code as 12.
_________________
Regards,
Mouli
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Mar 16, 2005 8:49 am    Post subject: Reply with quote

Mouli,

Quote:

If we have Records out of sequence(not in sorted order) also, we will be getting Return code as 12.


That depends on the ERRORLIMIT value coded on the repro statement. If you override the default value of 4 to much higher value then you would not get the error.

Code:

ERRORLIMIT('VALUE')                                                   
         - SPECIFIES THE NUMBER OF ERRORS REPRO COPY DATA SET WILL
           TOLERATE.                                               
'VALUE'  - SPECIFIES THE NUMBER OF ERRORS.  THE NUMBER MAY RANGE   
           FROM 1 TO 2,147,483,647.  THE DEFAULT VALUE IS 4.       


Hope this helps...

Cheers

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


Joined: 07 Jun 2003
Posts: 18
Topics: 7

PostPosted: Wed Mar 16, 2005 4:13 pm    Post subject: Reply with quote

hmm... Just checked the QW for REPRO. It says all the information that you provided..

Thanks for Reminding(Sorry updating!).

Thanks,
Mouli
_________________
Regards,
Mouli
Back to top
View user's profile Send private message
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