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

Query on Reading a file without multiple "GET"


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

New User


Joined: 24 May 2008
Posts: 17
Location: Gurgaon

PostPosted: Fri Sep 03, 2010 8:03 pm
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
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 03, 2010 11:32 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top