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
 

 

Move 0 to EOF-FLG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
de_jha_vu

New User


Joined: 11 Oct 2005
Posts: 3
Location: Philippines

PostPosted: Sat Feb 11, 2006 8:46 am    Post subject: Move 0 to EOF-FLG
Reply with quote

im reading a SAM file. after the read, i move 0 to eof-flg2 since i have to re-read it again from the start whenever it conforms with my given condition.

the code goes something like this:

read1.
read sam-file1 into record1
at end move 1 to eof-flg1
go to read1-exit.

if condition 1 then
move field1 to var1
perform read2 thru read2-exit.

move 0 to eof-flg2.

read1-exit. exit.

read2.
read sam-file2 into record2
at end move 1 to eof-flg2.

if field2 = var1 then
move ... to...
end-read.

read2-exit. exit.

but im getting status code 46 = ATTEMPT TO READ THE NEXT NONEXISTENT RECORD

and when i displayed eof-flg2,its equal to 1.
it should be equal to zero.
how can i get to read the sam-file2 again from the start of the file?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Sat Feb 11, 2006 1:51 pm    Post subject: Re: Move 0 to EOF-FLG
Reply with quote

Where do you close sam-file2, and then re-open it so that the pointer is moved back to the top?
Back to top
View user's profile Send private message
Aji

New User


Joined: 03 Feb 2006
Posts: 53
Location: Mumbai

PostPosted: Mon Feb 13, 2006 11:05 am    Post subject: Re: Move 0 to EOF-FLG
Reply with quote

Hi,
Once you r going for reread, initialize the key field (or move low values to key field), start (using start command) on the key field, read the record.

Records

Aji Cherian
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts Need information on COBOL MOVE CORRES... subratarec COBOL Programming 10 Tue Jun 28, 2016 10:38 pm
No new posts how to move view the remote file in o... mailtoashok CICS 2 Fri Feb 12, 2016 1:07 pm


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