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
 

 

An empty file created in tape gets automatically deleted.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Karthikeyan J

New User


Joined: 19 Dec 2006
Posts: 16
Location: Mumbai

PostPosted: Thu Jan 11, 2007 11:00 am    Post subject: An empty file created in tape gets automatically deleted.
Reply with quote

Hi,

What could be the reason ?

Is this due to some Installation settings?
How can i keep the dataset in TAPE even if its empty.

Please note that the dataset is not created with any special parameters.
Back to top
View user's profile Send private message

Karthikeyan J

New User


Joined: 19 Dec 2006
Posts: 16
Location: Mumbai

PostPosted: Thu Jan 11, 2007 11:52 am    Post subject: Re: An empty file created in tape gets automatically deleted
Reply with quote

Just one correction.....

The dataset is created in cartridge i.e UNIT=CART
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 Jan 11, 2007 10:58 pm    Post subject:
Reply with quote

Hello,

Please make sure that the cart is opened as output and then closed within the program.

Some programs do not open an output file until they "know" there will be some data written to it. If your program does not issue the open and close, there will be no info for the system to use for things like retention, size, create date, etc.
Back to top
View user's profile Send private message
Karthikeyan J

New User


Joined: 19 Dec 2006
Posts: 16
Location: Mumbai

PostPosted: Mon Jan 15, 2007 5:12 pm    Post subject: Hi,
Reply with quote

Hi Dick,

i tried opening and closing the file within the cobol program creating it. But the JCl went down with S722 abend though only a few lines were printed in the SYSOUT.I just tried increasing the REGION parameter.To my surprise, the job completed successfully.

Then i tried executing the previous version of COBOl program where file wasn't opened and closed, with increased region size, it also completed successfully.Further i noticed that if the output is defined on DISK, the Output is empty with low REGION size and populated with records for a higher region size.

Thanks in advance for your suggestion on this.
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: Mon Jan 15, 2007 9:19 pm    Post subject:
Reply with quote

Hello,

It is quite possible that the i/o modules for cart/tape are larger than the i/o modules for dasd.

As far as sometimes having data and sometimes not, i'd guess that this has to do with whether a physical write was ever issued. If the "written" data was only logical writes, there would be no output transferred to the file. Keep in mind that while your program "writes" every time through (logical i/o), the i/o routines typically issue a write for full blocks and at the time the file is closed (to prevent losing the last partial block).

If there is ever an abend, i'd suggest resolving the abend - then considering the output content. If you get "some" output from an abended run, it might be checked for content and format, but i wouldn't spend time determining how much was created on an abended run.

If you can run this successfully (repeatedly) and when you point to the DD to dasd it has NO records but when the DD points to tape/cart it HAS records you have an "it ain't supposed to work that way" condition. icon_confused.gif Look for some additonal diagnostics in one or more of the sysout datasets.

Let us know how this progresses . . .
Back to top
View user's profile Send private message
Karthikeyan J

New User


Joined: 19 Dec 2006
Posts: 16
Location: Mumbai

PostPosted: Thu Jan 18, 2007 10:50 pm    Post subject: Hoping to make the issue clear.
Reply with quote

Hi,

I think the issue has be made more clear

The following things happen while executing a COBOL program whose output file is not always Opened or closed in the flow.

1. Low REGION SIZE + UNIT=DISK = Empty OUTPUT file
2. High REGION SIZE + UNIT=DISK = Populated OUTPUT file
3. Low REGION SIZE + UNIT=CART = No OUTPUT file
4. High REGION SIZE + UNIT=CART = Populated OUTPUT file

The following things happen while executing the same COBOL program whose Output file is always opened and Closed in the flow

5. Low REGION SIZE + UNIT=DISK = s878 abend
6. High REGION SIZE + UNIT=DISK = Populated OUTPUT file
7. Low REGION SIZE + UNIT=CART = s722 abend
8. High REGION SIZE + UNIT=CART = Populated OUTPUT file

Things to be comprehended

* Why 1 ? (expecting 5)
* Why 2 ? Does a file on Disk is created even before the program access it? and Does a file on CART is only created when the program acceses it ?
Are these behaviours inherent or based on installation or other settings and specification.
* Why 7 as against 5 ?

Dick,
if you have already answered some of the question then it would be great if you could try and put it differently with an example involving numbers or by pontifying the sequence of events or something like that.

Regards,
Karthik
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 Jan 18, 2007 11:12 pm    Post subject:
Reply with quote

Hi Karthik,

What i believe you are seeing is all the result of the same conditions. It appears different because of the unit specification as well as whether the file is actually opened.

The difference in abends is most likely due to the amount of memory needed for the different access methods (tape/dasd).

Why 1 - if you do not open the dasd file for output, all you will get is dataset allocation and a catalog entry. It isn't really empty - it was never opened/closed which would have written an end-of-file mark, signifying an empty file.

Why2 - yor jcl caused the "creation" of the file. Because you did not open it, it is incomplete. If you do not open a tape file, tape management systems never see the tape activity. You may still have a catalog entry. . .

Optional INPUT files can be handy, but if yor jcl is set up to "always" create the file, i'd recommend making sure it is "always" opened so there will be no inconsistencies.

If you sometimes want to create the file and sometimes not, define the file as a temporary file and always open it output. Then pass a condition code to a followup step that will conditionally "really" create the tape/disk you need for those runs that have actual data.

Please let me know if you'd like some more info.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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