View previous topic :: View next topic
|
Author |
Message |
manjinder
New User
Joined: 04 Dec 2005 Posts: 45 Location: pune
|
|
|
|
i want to read variable length records in cobol pleasse help me with small example.
e.g
i/p
1111laxmi20000
2222rahulgupta15000
3333kumarrohan25000
want o/p like
1111 laxmi 20000
2222 rahulgupta 15000
3333 kumarrohan 25000
thanx in advance..
regard..
manjinder |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
manjinder wrote: |
i want to read variable length records in cobol pleasse help me with small example.
e.g
i/p
1111laxmi20000
2222rahulgupta15000
3333kumarrohan25000
want o/p like
1111 laxmi 20000
2222 rahulgupta 15000
3333 kumarrohan 25000
thanx in advance..
regard..
manjinder |
hai Manjinder,
from your example above what i conclude is the first four bytes are going to be numeric.
you can move the first four bytes into the output file through reference modification. then you can insert a blank in the next position.
finally you can move the name.
then you check the character type for numeric.
if numeric, insert once again a blank space and move the remaining to the output file.
hope that this psuedo code helps you,
corrections welcomed..
gowtham |
|
Back to top |
|
|
nagendrat
New User
Joined: 18 Jan 2006 Posts: 5
|
|
|
|
Hi,
Please declare in the FD section as following:
FD inflie-name.
BLOCK CONTAINS n1 TO n2 RECORDS
RECORD CONTAINS m CHARACTERS
RECORDING MODE IS V.
File Section.
01 Variable.
02 Varaible1 Occurs X times depending on variable2......
Manjinder, Once try to code like this with ur data and let me know if I am anything gone wrong.
Hope this will work for u........... |
|
Back to top |
|
|
|