Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To Understand EXECIO Read Parameter OPEN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Ilavenil

New User


Joined: 16 May 2018
Posts: 4
Location: India

PostPosted: Tue May 29, 2018 1:59 pm    Post subject: To Understand EXECIO Read Parameter OPEN
Reply with quote

Hello All,

I wish to understand more about the EXECIO read parameter OPEN. The manual says that EXECIO will open the dataset and place the cursor based upon linenum parameter. I tried the following statements

Code:

"EXECIO 3 DISKR INDD (SKIP"
"EXECIO 1 DISKR INDD (FINIS"
"EXECIO 1 DISKR INDD 5 (FINIS"


I was expecting an error, but irrespective of not opening the file explicitly, the file has been opened by EXECIO and the data has been returned!

I can understand about FINIS as if we are not closing the file explicitly, it will affect the concurrent execs that are waiting for the dataset based upon the locks. But I could not figure out the practical significance of OPEN. can anybody advice?
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2126
Location: UK

PostPosted: Tue May 29, 2018 7:19 pm    Post subject: Reply to: To Understand EXECIO Read Parameter OPEN
Reply with quote

Quote:
The manual says that EXECIO will open the dataset and place the cursor

No it does not. The manual says
Quote:
if you also specify a non-zero value for the linenum operand, EXECIO sets the current record number to the record number indicated by the linenum operand.

No mention of a cursor.

You use OPEN to explicity open the data set - good programming practice - and set the current record number. This is the equivalent of SKIP on the FIRST (only) access to the data set.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 251
Location: Denmark

PostPosted: Tue May 29, 2018 9:38 pm    Post subject:
Reply with quote

EXECIO will do an implicit OPEN if the dataset is not already opened. So what you do is not an error.
You will get records 4 and 5 returned in the stack.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I read error for HFS files Joe Kirsch PL/I & Assembler 6 Fri Sep 28, 2018 9:13 pm
No new posts How to find if segment is read in any... Priyanka AR IMS DB/DC 12 Thu Sep 20, 2018 1:34 pm
No new posts Open source project on mainframe agkshirsagar General Talk & Fun Stuff 3 Tue Sep 18, 2018 1:17 am
No new posts Cond parameter srini24 JCL & VSAM 10 Sun Sep 09, 2018 2:06 am
No new posts Error while trying to open an AIX in ... amitc23 CICS 4 Tue Sep 04, 2018 12:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us