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

File handling (2 records)


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bh

New User


Joined: 19 Mar 2006
Posts: 26
Location: India

PostPosted: Tue May 16, 2006 1:18 pm
Reply with quote

Hi,

What would be the O/P in this case, the piece of code is---

FD newfile
01 first1 x(24).
01 second1 x(24).


procedure division.

Read newfile into first1.
Display second1.


Note--- what will be the O/P of the last statement.


Regards,
BH.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed May 17, 2006 3:22 am
Reply with quote

bh,

all of the '01' levels under a 'FD' are redefines of each other. They occupy the same memory locations.

You do not have to 'Read newfile into first1'. 'Read newfile' will be enough. the READ INTO is only used when you want the record to be placed somewhere else in working storage.

Dave
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top