Re-Reading QSAM files.

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
Magyar5
Member
Posts: 1
Joined: Thu Nov 05, 2009 11:38 pm

Re-Reading QSAM files.

Post by Magyar5 » Fri Nov 06, 2009 5:49 pm

I am trying to find out if it is possible to POINT or jump to a pre-read record when using QSAM or ISAM files in Easytrieve. For example, lets say I am reading in 2 files (not matching them) and I may have a piece of code as follows:

If conditiona = true
Get file b
End-if

Then when I am done processing that If statement, I want to reset Fileb so that the next time I read a record from Filea and conditiona is true it will again, start from the top of Fileb and get the record at the top.

I know this is do-able with VSAM as it has a key and you simply point the key back to the first record in the file.

I know this is a tough question, but, I feel it is do-able. It may require outside help via Cobol or Assembler or if I can tweak the way Easytrieve reads sequential files... or get addressability to the record counter in Easytrieve I could make the change.

Any help on this tough question would be appreciated.

Editted: I should clarify that the 2 files being read are in a sequential order but are not keyed.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

easytrieve reading VSAM file

Post by Natarajan » Wed Feb 17, 2010 1:02 pm

Try with easytrieve command

Code: Select all

READ filename  KEY keyfieldname  STATUS
Here you need to declare file as ...

Code: Select all

FILE filename VS
......
Natarajan
Chennai

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others