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
 

 

Query on Reading a file without multiple "GET"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
sheersh

New User


Joined: 24 May 2008
Posts: 15
Location: Gurgaon

PostPosted: Fri Sep 03, 2010 8:03 pm    Post subject: Query on Reading a file without multiple "GET"
Reply with quote

Hi,

Is it possible to read subsequent records of the file without having 'GET' in the loop. I mean if it is possible to point a register in the start of record and keep bumping with the record length for next record read. ...... But again even if this is possible, How would i detect end of file.

Please advise. Thanks!
Back to top
View user's profile Send private message

Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Sep 03, 2010 8:48 pm    Post subject:
Reply with quote

If you are using GET, then it would NOT be a good idea to even THINK about doing your own record address manipulation, since any subsequent request for I/O via a GET macro will lead to overlaps in record processing ( i.e. the OS will not know that YOU did any adjustments for processing, and the next GET will retrieve the next record after the last one returned by the OS, NOT the next record after the last one processed by YOU ).
If you want to do your own record processing, switch to "block" mode READ with CHECK or WAIT ( for physical I/O ), and then use a roll-your-own routine for deblocking. You will have to test for EOF in two ways: 1) when the last block is a "full" block (EODAD addr coded in DCB); and 2) when the last block is a "short" block (detected in your own deblocking code).

If efficiency is your concern, perhaps a simple change of your MACRF from GM ( Get/Move ) to GL ( Get/Locate ) would help by eliminating the MOVE of data from the buffer to your defined storage area. Just adjust your code to change the MACRF, eliminate the target addr in the GET instruction, and use the address returned in Register 1 as the pointer to the record.
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: Fri Sep 03, 2010 11:32 pm    Post subject:
Reply with quote

Hello,

Why are you even considering this? It will not save i/o. . .

When you GET a record it is a logical record. Physical reads are done "outside" your code.

Quote:
Please advise. Thanks!
Don't do that icon_smile.gif
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm


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