santhoshm
New User
Joined: 13 Jun 2007 Posts: 32 Location: chennai
|
|
|
|
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. |
|