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
 
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 VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 3 Tue Nov 07, 2017 8:34 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm

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