eliminate the return code 8



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

eliminate the return code 8

Postby dn2012 » Tue May 08, 2012 8:35 pm

Hello,

I wrote a procedure:
Last step of the procedure is to Create VSAM File.

//STEP5    EXEC PGM=IDCAMS                                           
//SYSPRINT DD    SYSOUT=*                                           
//         PEND       


I execute as below:

//STEP5.SYSIN DD *                                             
 DELETE  (TSSDN.EMPLOYEE.MASTER) CLUSTER PURGE                 
 DEFINE CLUSTER(                   -                           
               NAME(TSSDN.EMPLOYEE.MASTER)  -                   
               FREESPACE(10 10)     -                           
               INDEXED              -                           
               KEYS(30 0)           -                           
               RECORDSIZE(80 80)    -                           
               SHAREOPTIONS(3 3)    -                           
               ERASE                -                           
               UNIQUE               -                           
              STORCLAS(NULL)       -                           
              VOLUMES(IMS60X)      -                           
              CYLINDERS(40 10)     -                           
                       )           -                           
        DATA(                             -                     
             NAME(TSSDN.EMPLOYEE.MASTER.DATA)     -             
             CONTROLINTERVALSIZE(8192)    -       
            )                             -       
        INDEX(                            -       
             NAME(TSSDN.EMPLOYEE.MASTER.INDEX)   -
             CONTROLINTERVALSIZE(8192))           
/*                                                 


First its delete and than create VSAM File. If VSAM File is not exists, I get return code 8 message in output.
I like to avoid that. I like to eliminate the return code 8. If its exits everything is fine.

thank you
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: eliminate the return code 8

 

Re: eliminate the return code 8

Postby Akatsukami » Tue May 08, 2012 8:53 pm

Here you go; you should be able to figure out from this how to do it.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: eliminate the return code 8

Postby dn2012 » Tue May 08, 2012 9:08 pm

Your meant set cond code as

//STEP5    EXEC PGM=IDCAMS     COND=(0,8, NE)                                     
//SYSPRINT DD    SYSOUT=*                                           
//         PEND                                                     


will it work?
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: eliminate the return code 8

Postby Akatsukami » Tue May 08, 2012 9:12 pm

dn2012 wrote:Your meant set cond code as

//STEP5    EXEC PGM=IDCAMS     COND=(0,8, NE)                                     
//SYSPRINT DD    SYSOUT=*                                           
//         PEND                                                     


will it work?

Of course not; as that link makes perfectly clear, you want to use an IDCAMS modal command, not a JCL COND parameter. At least pretend to read the fine manual.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: eliminate the return code 8

Postby Robert Sample » Tue May 08, 2012 9:25 pm

Hint: read in the manual about the IDCAMS IF command and MAXCC value.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: eliminate the return code 8

Postby dn2012 » Wed May 09, 2012 12:06 am

I added

//STEP5.SYSIN DD *                           
 DELETE  (TSSDN.EMPLOYEE.MASTER) CLUSTER PURGE
 SET       MAXCC = 0                         
 DEFINE CLUSTER(                   -         


but getting as:

DELETE (TSSDN.EMPLOYEE.MASTER) CLUSTER PURGE
IDC3012I ENTRY TSSDN.EMPLOYEE.MASTER NOT FOUND
IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLA3-42
IDC0551I ** ENTRY TSSDN.EMPLOYEE.MASTER NOT DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8

SET MAXCC = 0

thanks
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: eliminate the return code 8

Postby Akatsukami » Wed May 09, 2012 12:22 am

Nu? The return code from the step was zero, was it not?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: eliminate the return code 8

Postby BillyBoyo » Wed May 09, 2012 12:23 am

Take notice of Robert's comment. You don't just want to set MAXCC to zero, you only want to do it for an 8. Your way, you'll set to zero even with something disastrous happening. The delete, not there, gets 8. Only change the 8.

EDIT: Following from the honourable, the SET MAXCC is not going to change the return-oode of any IDCAMS function, it is just going to set MAXCC to zero at that point, overwriting whatever was in it at the time (your 8 when the file does not exist).

Try the manual. Try the manual.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: eliminate the return code 8

Postby dn2012 » Wed May 09, 2012 5:38 am

I tried different ways but not working.

if code = 8 then
set maxcc = 0
end

any hep will be appriciated
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: eliminate the return code 8

Postby Robert Sample » Wed May 09, 2012 6:50 am

Why not try using MAXCC in the IF statement, the way the manual shows?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post