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

Use the same dataset as both input and output in PL/I


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Z_Ubavelski

New User


Joined: 05 Oct 2014
Posts: 2
Location: Switzerland

PostPosted: Wed Nov 12, 2014 4:03 am
Reply with quote

Hi mainframe community,

I have a problem in PL/I. I want to use the same dataset as both input and output.

At first I want to write to the dataset as output. In case of abend I want to read the same file and use the input.

Thanks in advance.

Regards,
Zoran
Back to top
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1245
Location: Vilnius, Lithuania

PostPosted: Wed Nov 12, 2014 5:01 am
Reply with quote

Code:
open file(whatever) input;

and
Code:
open file(whatever) output;


Or use dynamic allocation available in Enterprise PL/I.

The far bigger problem is that your dataset may suffer from integrity problems after an abend. There is no way of knowing if the last record in the dataset is actually the last record that you processed.

BAD DESIGN! BAD, BAD, BAD!
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Nov 12, 2014 2:49 pm
Reply with quote

Totally agree with Prino. That is one of the worst ideas ever to hit the IT industry over 40 years ago, and yet people still think about doing it.

36_2_18.gif
Back to top
View user's profile Send private message
Z_Ubavelski

New User


Joined: 05 Oct 2014
Posts: 2
Location: Switzerland

PostPosted: Thu Nov 13, 2014 3:10 am
Reply with quote

Hi all,

thank you for your help. I was able to solve the problem.

Regards,
Zoran
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts JCL (SET) variables in input stream data JCL & VSAM 0
This topic is locked: you cannot edit posts or make replies. I HAVE 2 INPUT FILES WITH SAME LAYOUT... COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. ICETool reporting 2 das old dataset DFSORT/ICETOOL 13
No new posts Remove additional information in SUPE... TSO/ISPF 10
No new posts Printing a dataset in DUMP format wit... ABENDS & Debugging 2
Search our Forums:

Back to Top