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

problem with output datatset


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 27, 2009 6:43 pm
Reply with quote

sharad_shanu wrote:
I aplogize but I am using internal reader and the invoked JCL is supposed to create GDG. Please have a look at cobol code.
There is no error message. GDG versions are created but the first is having only one record (last record) and rest all versions are empty. Also JCL shows only one step of the GDG creation (STEPAA). I am not too sure but it might be linked with closure and opening of file before each JCL.

/RANT ON
I aplogize but I am using internal reader and the invoked JCL is supposed to create GDG. Please have a look at cobol code.
There is no error message. GDG generations are created but the first is having only one record (last record) and rest all generations are empty. Also JCL shows only one step of the GDG creation (STEPAA). I am not too sure but it might be linked with closure and opening of file before each JCL
/ RANT OFF

Please use the correct terms !
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: Wed May 27, 2009 7:08 pm
Reply with quote

Once you predefined the file, what does your modified JCL look like? Does it specify DISP=SHR or DISP=OLD for the OUTFILE DD name? If so, then each time your COBOL program opens the file for output all previous records are deleted. You must use DISP=MOD to keep the previous records.

Also note that the way your code was posted, you will submit the job to the internal reader each time your condition (bytes 1 - 6 of the input record containing NAVEEN) is hit; are you sure you're wanting to submit the job that many times?

And I emphasize the terminology point raised earlier -- if you don't know the difference between a GDG version and a GDG generation you are going to run into problems in the future.
Back to top
View user's profile Send private message
sharad_shanu

New User


Joined: 03 Oct 2006
Posts: 40

PostPosted: Wed May 27, 2009 7:17 pm
Reply with quote

here is my modified JCL:

//TEST12 JOB (PROD,0401,999,999,,4100),'REEP-SAP EXT/FORMAT ',
// CLASS=D,MSGCLASS=8,NOTIFY=&SYSUID
//*
//STEP07 EXEC PGM=TEST12
//STEPLIB DD DISP=SHR,DSN=PB@OPERS.CMNSTG.WMCS.#003431.LOD
//SYSOUT DD SYSOUT=(*,INTRDR)
//SYSUDUMP DD SYSOUT=*
//INFILE DD DSN=TB@CSSVC.SHARAD.INP,DISP=SHR
//OUTFILE DD DSN=TB@CSSVC.SHARAD.OUT,DISP=SHR
//*
//STEP08 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD DSN=TB@CSSVC.SHARAD.OUT,DISP=SHR
//SYSUT2 DD SYSOUT=*
//*
Back to top
View user's profile Send private message
sharad_shanu

New User


Joined: 03 Oct 2006
Posts: 40

PostPosted: Wed May 27, 2009 7:19 pm
Reply with quote

Ans regarding your second question - yes, I need to invoke internal reader multiple times. This is related to my requirement.

For generation, my mistake. I was talking about versions.
Back to top
View user's profile Send private message
sharad_shanu

New User


Joined: 03 Oct 2006
Posts: 40

PostPosted: Wed May 27, 2009 7:20 pm
Reply with quote

Also since i am writing bunch a records bertween two 'NAVEEN' therefore I am ok with file getting empty at each open. Invoked JCL will gener those many records prior to re-opening of the file.
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: Wed May 27, 2009 7:46 pm
Reply with quote

No, you are talking about generations. A version is GxxxxV01 or GxxxxV02 ... and must be manually created (other than the zero version, which is automatically created when the +1 generation is cataloged).

STEPBB of your JCL as posted has a syntax error. When I corrected the syntax error, I got
Code:
IEF286I RS0MF078 STEPBB SYSUT2 - DISP FIELD INCOMPATIBLE WITH DSNAME
IEF272I RS0MF078 STEPBB - STEP WAS NOT EXECUTED.
because you are attempting to catalog the same generation of a GDG twice in your job submitted to the internal reader. I would also recommend using different job names for the job you submit and the jobs that are input through the internal reader since JES really doesn't like running more than one job of the same name at a time.
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 -> COBOL Programming Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
No new posts XDC SDSF output to temp dataset CLIST & REXX 4
Search our Forums:

Back to Top