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 

Error Handling in IEBGENER
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Thu Jul 15, 2004 2:34 pm    Post subject: Error Handling in IEBGENER Reply with quote

I am trying to concatenate two files using IEBGENER. I get a return code 012 when the files are empty. i checked the iebgener documentation in IBM website, they say sysin should contain an statement Exits ioerror=some routine name.

What kinda routine this should be ? Is it a JCL or something else ? Please provide me a sample code. I just want to go to next step if i encounter an IOERROR.
what should i do if i want to go to next step ignoring the error. ( I know I can use cond parameter but it is too complex ) .

can I have sysin with only exits ioerror= some routine name ? I dont have any use of Generate statement.

Any help will be appreciated.
Thanks,
Vivek
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 15, 2004 2:44 pm    Post subject: Reply with quote

Vivek,

I don't think IEBGENER will give you a return code of 12 for empty file. I just checked it and it gives a return code zero.
Code:

//STEP0100 EXEC PGM=IEBGENER                   
//SYSPRINT DD SYSOUT=*                         
//SYSUT1   DD DSN=SAMP.INPUT1,         
//            DISP=SHR                         
//         DD DSN=SAMP.INPUT2,         
//            DISP=SHR                         
//SYSUT2   DD DSN=IEB.CHECK,           
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE)
//SYSIN    DD DUMMY                             


This job ran fine with a zero return code. Both the file SAMP.INPUT1 & SAMP.INPUT2 are empty.

Please post your JCL and error messages from sysprint,so that we can take a look

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
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Jul 15, 2004 3:03 pm    Post subject: Reply with quote

Quote:

what should i do if i want to go to next step ignoring the error.


Nothing. A return code of 12 here is not going to prevent a subsequent step from executing, unless, of course, it does a check for this step's return code.
Back to top
View user's profile Send private message
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Thu Jul 15, 2004 3:11 pm    Post subject: Reply with quote

Code:

//PSTEP11, EXEC PGM=TM,REGION=2048K,COND=(0,NE)
//STEPLIB  DD DSN=&TM..devel.fo.LOAD,DISP=SHR
//ERRORS   DD DSN=&TM..devel.ERRORS.DATA,DISP=SHR
//USERLIB  DD DSN=&TM..devel.FUSELIB.LOAD,DISP=SHR
//fo   DD DSN=&TM..devel.fo.LOAD,DISP=SHR
//MASTER   DD DSN=&TM..&FMODE..MASTER.DATA,DISP=SHR
//FOCEXEC  DD DSN=&TM..&FMODE..FOCEXEC.DATA,DISP=SHR
//FOCSTACK DD UNIT=SYSDA,SPACE=(TRK,(20,5))
//HOLD     DD UNIT=SYSDA,SPACE=(TRK,(20,5))
//HOLDMAST DD UNIT=SYSDA,SPACE=(TRK,(5,1,5))
//FOCSORT  DD UNIT=SYSDA,SPACE=(TRK,(20,5))
//         DD UNIT=SYSDA,SPACE=(TRK,(20,5))
//         DD UNIT=SYSDA,SPACE=(TRK,(20,5))
//HLIPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=88,BLKSIZE=88)
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//tmfILE01 DD UNIT=SYSDA,SPACE=(CYL,(20,10))
//tmfBALFL DD DSN=&sys..&MODE..STATS.BALANCE.TM,DISP=SHR
//tmfBALF2 DD DSN=&sys..&MODE..STATS.BALANCE2.TM,DISP=SHR
//tmfBALF4 DD DSN=&sys..&MODE..STATS.BALANCE4.TM,DISP=SHR
//tmfBALF5 DD DSN=&sys..&MODE..STATS.BALANCE5.TM,DISP=SHR
//tmf0800S DD DSN=&sys..&MODE..STATS.SORTOF2,DISP=SHR
//tmfTABLE DD DSN=&sys..&MODE..IDD.TABLES,DISP=SHR
//*OFFLINE  DD SYSOUT=(&RMDS,,FM57)      ** 421252 **
//OFFLINE  DD DSN=&&tmf0802,
//            DISP=(NEW,PASS,DELETE),
//            DCB=(RECFM=FBA,LRECL=130,BLKSIZE=0),
//            SPACE=(CYL,(10,20)),
//            UNIT=SYSDA
//SYSIN    DD DSN=&LIB..parm.DATA(FM480S02),DISP=SHR
//* * * * * * * * * * * * * * * * * * *
//*                                   *
//*    F O C U S :  tmf0802A  FC      *
//*    OUT OF COMPLIANCE (PAGE 5)     *
//*                                   *
//* * * * * * * * * * * * * * * * * * *
//*
//PSTEP11A EXEC PGM=TM,REGION=2048K,COND=(0,NE)
//STEPLIB  DD DSN=&TM..devel.fo.LOAD,DISP=SHR
//ERRORS   DD DSN=&TM..devel.ERRORS.DATA,DISP=SHR
//USERLIB  DD DSN=&TM..devel.FUSELIB.LOAD,DISP=SHR
//fo   DD DSN=&TM..devel.fo.LOAD,DISP=SHR
//MASTER   DD DSN=&TM..&FMODE..MASTER.DATA,DISP=SHR
//FOCEXEC  DD DSN=&TM..&FMODE..FOCEXEC.DATA,DISP=SHR
//HOLD     DD UNIT=SYSDA,SPACE=(TRK,(20,5))
//HOLDMAST DD UNIT=SYSDA,SPACE=(TRK,(5,1,5))
//FOCSORT  DD UNIT=DISK,SPACE=(CYL,(200,100),RLSE)
//FOCSTACK DD UNIT=DISK,SPACE=(CYL,(200,100),RLSE)
//HLIPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=88,BLKSIZE=88)
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//tmfILE01 DD UNIT=SYSDA,SPACE=(CYL,(20,10))
//* //tmfBALFL DD DSN=&sys..&MODE..STATS.BALANCE.TM,DISP=SHR
//* //tmfBALF2 DD DSN=&sys..&MODE..STATS.BALANCE2.TM,DISP=SHR
//* //tmfBALF3 DD DSN=&sys..&MODE..STATS.BALANCE3.TM,DISP=SHR
//* //tmfBALF4 DD DSN=&sys..&MODE..STATS.BALANCE4.TM,DISP=SHR
//* //tmfBALF5 DD DSN=&sys..&MODE..STATS.BALANCE5.TM,DISP=SHR
//tmf0800S DD DSN=&sys..&MODE..STATS.SORTOF2A,DISP=SHR
//tmfTABLE DD DSN=&sys..&MODE..IDD.TABLES,DISP=SHR
//*  THESE ARE J.SHUTACK'S FILES DO NOT ADD OVERRIDE ON DSN NAME
//TRIALS5Z DD DSN=FM.camstat.FACTS.EXTRACT.FC,DISP=SHR
//PIDKC    DD DSN=FM.camstat.FACTS.EXTRACT.KCNUMBER,DISP=SHR
//* OFFLINE  DD SYSOUT=(&RMDS,,FM57)
//OFFLINE  DD DSN=&&tmf0802A,
//            DISP=(NEW,PASS,DELETE),
//            DCB=(RECFM=FBA,LRECL=130,BLKSIZE=0),
//            SPACE=(CYL,(10,20)),
//            UNIT=SYSDA
//SYSIN    DD DSN=&LIB..parm.DATA(FM480S2A),DISP=SHR


//PSTEP21, EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=&&tmf0802,DISP=(OLD,PASS)
//         DD DSN=&&tmf0802A,DISP=(OLD,PASS)
//SYSUT2   DD SYSOUT=(&RMDS,,FM57)
//SYSIN    DD DUMMY


Kolusu,
I the first temp file &&fmf0802 is empty but second file &fmf0802 is not.
I read somewhere that in concatenation the files with longer lines should be at the top. i interchanged in sysut1 still abended.

the error code from the spool is
IEB351I I/O ERROR ,FMPD480 ,PSTEP11B,210D,D,SYSUT1 ,READ ,WRNG.LEN.RECORD,00000054000000,BSAM
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 15, 2004 3:26 pm    Post subject: Reply with quote

vivek,

Code:

IEB351I I/O ERROR ,FMPD480 ,PSTEP11B,210D,D,SYSUT1 ,READ ,WRNG.LEN.RECORD,00000054000000,BSAM


Look carefully at the error message. It is pointing to PSTEP11B. Your IEBGENER step in the jcl you posted is PSTEP21. so the error messages are from a different step

So check the datasets in PSTEP11B

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


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Thu Jul 15, 2004 3:29 pm    Post subject: Reply with quote

Kolusu assume PSTEP11b as PSTEP21 , coz it was yesterday's output and i changed and put the step to the bottom of jcl. both are same. treat step name as same.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Thu Jul 15, 2004 3:30 pm    Post subject: Reply with quote

Kolusu,

the situation is both files are FBA and second file has some data.
I assume problem could be with Block size. i increased the block size from 0 to 1300 but no use. i changed FBA to FB , still no use.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Thu Jul 15, 2004 3:40 pm    Post subject: Reply with quote

Quote:

Nothing. A return code of 12 here is not going to prevent a subsequent step from executing, unless, of course, it does a check for this step's return code.



There is a return code check.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Thu Jul 15, 2004 3:41 pm    Post subject: Reply with quote

I used an IF condition to execute next steps for condition 12 and 0. but if we have to restart these steps, the subsequents steps are not run because of the IF condition.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Fri Jul 16, 2004 8:03 am    Post subject: Reply with quote

Kolusu here is more cleaner explanation.

,EDIT ,JUMSB4.FMF0802 ,Columns,00001,00072,
,Command ===>, ,Scroll ===>,CSR ,
,******,***************************** Top of Data ******************************
,******,**************************** Bottom of Data ****************************

Dataset is Empty,

EDIT ,JUMSB4.FMF0803 ,Columns,00001,00072,
Command ===>, ,Scroll ===>,CSR ,
******,***************************** Top of Data ******************************
==MSG>,-Warning- The UNDO command is not available until you change
==MSG>, your edit profile using the command RECOVERY ON.
000100,greek
******,**************************** Bottom of Data ****************************

has one record Greek

I ran two jcls with iebgener

JCL I
-------
1 //JUMSB4X JOB B30168FM50919,'BALAJI',MSGCLASS=T,CLASS=A,REGION=0K,
// NOTIFY=JUMSB4
//* $ACFJ219 ACF2 ACTIVE NJAOC
2 //PSTEP12 EXEC PGM=IEBGENER
3 //SYSPRINT DD SYSOUT=*
4 //SYSUT1 DD DSN=JUMSB4.FMF0802,DISP=SHR
5 // DD DSN=JUMSB4.FMF0803,DISP=SHR
6 //SYSUT2 DD SYSOUT=(V,,FM57)
7 //SYSIN DD DUMMY

<b>SYSPRINT I GOT IS </b>
<b>----------------------</b>
DATA SET UTILITY - GENERATE
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT

IEB351I I/O ERROR ,JUMSB4X ,PSTEP12 ,2148,D,SYSUT1 ,READ ,WRNG.LEN.RECORD,000000C1000000,BSAM

JCL II
--------

********************************* TOP OF DATA **********************************
1 //JUMSB4X JOB B30168FM50919,'BALAJI',MSGCLASS=T,CLASS=A,REGION=0K,
// NOTIFY=JUMSB4
//* $ACFJ219 ACF2 ACTIVE NJAOC
2 //PSTEP12 EXEC PGM=IEBGENER
3 //SYSPRINT DD SYSOUT=*
4 //SYSUT1 DD DSN=JUMSB4.FMF0803,DISP=SHR
5 // DD DSN=JUMSB4.FMF0802,DISP=SHR
6 //SYSUT2 DD SYSOUT=(V,,FM57)
7 //SYSIN DD DUMMY

DATA SET UTILITY - GENERATE
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT

IEB351I I/O ERROR ,JUMSB4X ,PSTEP12 ,2148,D, ,READ ,WRNG.LEN.RECORD,000000C1000000,BSAM

The difference is I ran the first JCL with empty dataset first and non empty dataset second and vice versa in the second JCL.

I read in IBM Manuals that I need to code sysin with Exits statement . the syntax is

Exits IOERROR=Errrtn,

I donno what kinda routine is ERRRTN. Is it a cobol program or what kind it is ? IF someone can help it would be great.

Thanks,
Vivek
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jul 16, 2004 8:11 am    Post subject: Reply with quote

Vivek,

Post the DCB Parameters of both JUMSB4.FMF0802 & JUMSB4.FMF0803. Look in 3.4 listing by putting an S besides the datasets and let me know. If any one of them does not have a valid record length you will get that error.

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


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jul 16, 2004 8:53 am    Post subject: Reply with quote

I would presume that the EXIT you would use would be coded in either Assembler or C.
Back to top
View user's profile Send private message
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Fri Jul 16, 2004 10:07 am    Post subject: Reply with quote

Quote:

Post the DCB Parameters of both JUMSB4.FMF0802 & JUMSB4.FMF0803. Look in 3.4 listing by putting an S besides the datasets and let me know. If any one of them does not have a valid record length you will get that error.


Kolusu I assume you are asking me to give u the dataset characterisitics.

Data Set Information
Command ===>

Data Set Name . . . : JUMSB4.FMF0802

General Data Current Allocation
Volume serial . . . : WORK34 Allocated cylinders : 10
Device type . . . . : 3390 Allocated extents . : 1
Organization . . . : NONE
Record format . . . : FBA
Record length . . . : 130
Block size . . . . : 130 Current Utilization
1st extent cylinders: 10 Used cylinders . . : 0
Secondary cylinders : 20 Used extents . . . : 0

Creation date . . . : 2004/07/16
Referenced date . . : 2004/07/16


Data Set Information
Command ===>

Data Set Name . . . : JUMSB4.FMF0803

General Data Current Allocation
Volume serial . . . : WORK34 Allocated cylinders : 10
Device type . . . . : 3390 Allocated extents . : 1
Organization . . . : PS
Record format . . . : FBA
Record length . . . : 130
Block size . . . . : 130 Current Utilization
1st extent cylinders: 10 Used cylinders . . : 1
Secondary cylinders : 20 Used extents . . . : 1

Creation date . . . : 2004/07/16
Referenced date . . : 2004/07/16
Expiration date . . : ***None***
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jul 16, 2004 10:28 am    Post subject: Reply with quote

vivek,
The dataset attributes looks ok. try removing the Routing the sysut2 to sysout instead of (V,,FM57) and see if it works.

Code:

//PSTEP12  EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=JUMSB4.FMF0803,DISP=SHR
//         DD DSN=JUMSB4.FMF0802,DISP=SHR
//SYSUT2   DD SYSOUT=*
//SYSIN    DD DUMMY
/*


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


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Fri Jul 16, 2004 11:38 am    Post subject: Reply with quote

Kolusu
Same Result

Balaji
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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