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

COBOL Output write problem


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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
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

Moderator Emeritus


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

PostPosted: Thu Aug 11, 2011 1:30 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 11, 2011 5:32 am
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

Moderator Emeritus


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

PostPosted: Thu Aug 11, 2011 9:47 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top