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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Use the same dataset as both input and output in PL/I
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

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Wed Nov 12, 2014 5:01 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 12, 2014 2:49 pm    Post subject:
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    Post subject: I need no more help
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 1 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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