Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COBOL Output write problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Wed Aug 10, 2011 8:28 pm    Post subject: COBOL Output write problem
Reply with quote

Hi,

I have a cobol code which creates 13 output generations from a single input file based on certain conditions. When i ran the code, i got the data in first file and last file but the other versions are empty. Then i tried to trace the code line by line... and found that the records are getting processed properly and being writen to the output but the data is not present in the output file. I am confused.. Any guess>??????
Back to top
View user's profile Send private message

Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Aug 10, 2011 8:33 pm    Post subject:
Reply with quote

How are you coding the dataset names in the JCL? Are they separate DDs? Are the generations hardcoded?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 10, 2011 8:33 pm    Post subject:
Reply with quote

yeah, line 87 of your code invalidates the 3rd dd statement in your jcl.
Back to top
View user's profile Send private message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Wed Aug 10, 2011 8:34 pm    Post subject:
Reply with quote

yes... they are seperate DD statements

The generations will be like +1, +2, +3 etc.. until +13
Back to top
View user's profile Send private message
sijayapal

New User


Joined: 23 Dec 2008
Posts: 69
Location: India

PostPosted: Wed Aug 10, 2011 8:38 pm    Post subject:
Reply with quote

Quote:
yeah, line 87 of your code invalidates the 3rd dd statement in your jcl.


Am not getting your point here
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Aug 10, 2011 8:49 pm    Post subject:
Reply with quote

sijayapal wrote:
Quote:
yeah, line 87 of your code invalidates the 3rd dd statement in your jcl.


Am not getting your point here


The point is that you have given us nothing to go on so the best we can do is a wild guess. I would have guessed at line 3546.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Aug 11, 2011 1:30 am    Post subject:
Reply with quote

Hello,

If you are unwilling to post the requested info, we should delete this topic.

All you have done is waste everyone's time so far.

You have been part of the forum long enough to know how questions/problems should be posted. . .
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Aug 11, 2011 5:32 am    Post subject: Reply to: COBOL Output write problem
Reply with quote

Sija,

Why do you want to use a GDG for 13 output files from the same program? Sounds like a nightmare to manage or understand. Once each generation is created (if it works) how are you going to know which selection of data is on which specific dataset? And how are you going to know after 20 days of production runs? How are you going to know which group of 13 datasets are in a "set" to be processed together. I hope you are not going to just code -1, -2, -3 etc and just hope that it all matches up. You are going to "use up" your GDG 13 times faster than "normal". What benefit do you see this approach giving you? I can't think of one yet.

If you believe your program is working then you must assume the GDG approach you are using is messing up somehow. Why don't you try to run the program with 13 uniquely-named output files and see what results you get?

If you are then still confused by the output, we need to see JCL and program code, nicely formatted (use the Code button to preserve formatting in a post, use Preview to check it looks OK).
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Aug 11, 2011 9:47 am    Post subject:
Reply with quote

Hello,

How is the gdg defined?

Why has the jcl not yet been posted?

Who approved of creating al of these generatons in a single job or step icon_confused.gif I asked a few of the folks i currently and called a few i previously worked with and they all said such would never be allowed to run in Production.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Aug 11, 2011 9:30 pm    Post subject:
Reply with quote

Without commenting on why you want to do this, strictly as a COBOL/JCL puzzle to be figured out...

Check to make sure that each FD is being opened only once, and closed only once. Reopening the FD will basically erase the file.

Check to make sure the each file is actually being cataloged/(rolled in) after the step runs. You might be seeing the results of 'not cataloged' errors.

Check each file to make sure it's allocation is not 0/0. That might point to a JCL typo. If you have an open statement on a non-existent DD, some shops will allocate a temporary dataset to it. (I think it's Stop X-37 that does that here). After the step runs, the file you think you wrote to is empty, because it got cataloged, but the temp dataset is gone.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us