IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

IEBGENER, Help


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Sat Aug 08, 2009 11:48 pm
Reply with quote

Hi,

I am trying to Concatenate 3 datasets to one dataset using IEBGENER, But i am getting error as mentioned below,

My lrecl and Blksize are all same for all the 4 datasets, can some one suggest me what would be the problem is?


DATA SET UTILITY - GENERATE

IEB351I I/O ERROR ,HDRTLNDM,HDRTRL ,9BE0,D, ,READ ,NO RECORD FOUND,00001B2000006,BSAM
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Sun Aug 09, 2009 12:10 am
Reply with quote

are you able to BROWSE (not Edit or View) the data sets and scroll all the way to the bottom? What is the JCL?
Back to top
View user's profile Send private message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Sun Aug 09, 2009 12:17 am
Reply with quote

MBabu wrote:
are you able to BROWSE (not Edit or View) the data sets and scroll all the way to the bottom? What is the JCL?



Yes i can,

Code:
//STEP01   EXEC PGM=IEBGENER                                       
//SYSUT1 DD DSN=XXX,DISP=SHR               
//       DD DSN=YYY,DISP=SHR
//       DD DSN=ZZZ,DISP=SHR             
//SYSUT2 DD DSN=YYY,DISP=OLD
//SYSOUT DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=*                                             
//SYSIN DD *


Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Aug 09, 2009 1:12 am
Reply with quote

Hello,

Is file2 or file3 empty? Is there a proper end-of-file? Simply allocating the file may not be sufficient. . .

What happens if you run the process with one file at a time?
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Sun Aug 09, 2009 7:13 am
Reply with quote

I tried this and it works with my test files. Are these files Fixed or Variable? I'm wondering if a variable record might have a zero length. I don't know how to create a file like that so I can't test the idea.

If this is a 1 time task, you can try ISPF option 3.3 (move/copy) and select MOD on the 2nd panel

btw, there is no SYSOUT DD for the utilities
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Mon Aug 10, 2009 8:43 pm
Reply with quote

Is DSN=YYY actually used as both INPUT and OUTPUT?
Back to top
View user's profile Send private message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Mon Aug 10, 2009 8:46 pm
Reply with quote

Bill Dennis wrote:
Is DSN=YYY actually used as both INPUT and OUTPUT?


Yes Dennis
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Mon Aug 10, 2009 9:54 pm
Reply with quote

Bill, your eyes are better than mine! Depending on the amount of data in XXX and blocksizes, I'd expect it to maybe get an x37 abend as it just copies data it has already written over and over, but if it reads past the nonexistent EOF of YYY this error would make sense.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 10, 2009 10:15 pm
Reply with quote

Hello,

Quote:
Bill Dennis wrote:
Is DSN=YYY actually used as both INPUT and OUTPUT?

Yes Dennis


You have changed this so that the output dataset is no longer one of the inputs. . .?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Aug 10, 2009 10:44 pm
Reply with quote

If you really need to do this -- and most of the time it turns out not to be a requirement once looked at -- you will need to have a two-step job. The first step copies your three input files to a temporary file passed to the next step. The second step writes the temporary file back into the output file YYY as you called it.

In general, it is not a good idea to use the same file for input and output in one step unless you write the program to close the file between input and output operations -- for IEBGENER as the other utilities, you're not writing the program so you cannot control the processing. Therefore you should not use the same file for input and output for any utility.

Unpredictable results will occur when the same file is used for input and output at the same time -- often abends, sometimes corrupted data files.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Aug 11, 2009 2:49 am
Reply with quote

Given the DISP of SYSUT2, I'm surprised the job ran at all. Wouldn't there have been an exclusive enque put on it to prevent the execution?
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Aug 11, 2009 7:03 am
Reply with quote

Terry Heinze wrote:
Given the DISP of SYSUT2, I'm surprised the job ran at all. Wouldn't there have been an exclusive enque put on it to prevent the execution?

not within the same address space. The whole job will get it as OLD.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Aug 11, 2009 7:07 am
Reply with quote

My mistake. I think I was thinking the job consisted of 2 steps. I think in a 2 step job the DISP=OLD in step 2 would have prevented the 1st step from even starting wouldn't it? I can't test it since I have no access to a mainframe.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Aug 11, 2009 4:18 pm
Reply with quote

In JES3, the DISP=OLD would force exclusive access to the data set for the entire job.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts IEBGENER is not Creating Member in PD... JCL & VSAM 7
No new posts IEBGENER to copy from FB to VB and re... All Other Mainframe Topics 3
No new posts Error in IEBGENER JCL & VSAM 1
No new posts EMAIL using IEBGENER - SMTP JCL & VSAM 4
No new posts IEBGENER giving IEB351I I/O ERROR JCL & VSAM 18
Search our Forums:

Back to Top