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
 

 

assign 20 lines of the sequential file to 20 fields -NATURAL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Thu Jul 12, 2007 10:14 am    Post subject: assign 20 lines of the sequential file to 20 fields -NATURAL
Reply with quote

Hi,
Can some one tell me the solution for this problem.
1650 READ WORK 5 #INPUT-TEXT-RECORD
1660 END-WORK

I have to get simple text(of 20 lines) from a sequential file and these 20 lines have to be assigned to 20 variables.
The variable declarations are

445 1 #INPUT-TEXT-RECORD (A1500)
0450 1 REDEFINE #INPUT-TEXT-RECORD
0455 2 #TEXT-LN1 (A75)
0460 2 #TEXT-LN3 (A75)
0465 2 #TEXT-LN4 (A75)
0470 2 #TEXT-LN5 (A75)
0475 2 #TEXT-LN6 (A75)
0480 2 #TEXT-LN7 (A75)
0485 2 #TEXT-LN8 (A75)
0490 2 #TEXT-LN9 (A75)
0495 2 #TEXT-LN10 (A75)
0500 2 #TEXT-LN11 (A75)
0505 2 #TEXT-LN12 (A75)
0510 2 #TEXT-LN13 (A75)
0515 2 #TEXT-LN14 (A75)
0520 2 #TEXT-LN14A (A75)
0525 2 #TEXT-LN15 (A75)
0530 2 #TEXT-LN16 (A75)
0535 2 #TEXT-LN17 (A75)
0540 2 #TEXT-LN18 (A75)
0545 2 #TEXT-LN19 (A75)
0550 2 #TEXT-LN20 (A75)
I wrote the following displays in the program.

1630 WRITE ' #TEXT-LN1' #TEXT-LN1
1635 WRITE ' #TEXT-LN3' #TEXT-LN3
1640 WRITE ' #TEXT-LN4' #TEXT-LN4
1645 WRITE ' #TEXT-LN5' #TEXT-LN5
1650 WRITE ' #TEXT-LN6' #TEXT-LN6

But in output I can only one line that is
#TEXT-LN1 VERY TRULY YOURS,
#TEXT-LN3
#TEXT-LN4
#TEXT-LN5
#TEXT-LN6
The line #TEXT-LN1 is also displaying the value of last line of the sequential file.
I would like to assign 20 lines of the sequential file to 20 fields as above.
Please let me know how to solve this issue.
This is a natual programming language.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Jul 12, 2007 1:00 pm    Post subject:
Reply with quote

Why #INPUT-TEXT-RECORD is defined as a group and not as an array????


O.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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