View previous topic :: View next topic
|
Author |
Message |
Gopinath_Natrayan
New User
Joined: 20 Dec 2006 Posts: 2 Location: India
|
|
|
|
Hi,
Iam having an input file of variable format...it contains records of different length.I want to process the file(read and write) based on the length..
please help me in doing this
Thanks in advance |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Bytes 1&2 of the RDW contain the length of the record.
I'm a little intrigued as to why the record length should be the deciding factor of whether a record is processed or not. Can you elaborate on that. |
|
Back to top |
|
|
Gopinath_Natrayan
New User
Joined: 20 Dec 2006 Posts: 2 Location: India
|
|
|
|
hi expat,
my requirement is my input file has different record of different layout..i have to process according to the layout.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And you have the record layouts from the creating program ?
Are there any readily available pointers such as a record type
e.g. If record type = 3 then use this layout ? |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
As expat suggested generally you will have a field called record type in the input record which will tell you which layout needs to be used for that record. Check for that field and accordingly move the input record into respective layout. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Gopinath_Natrayan wrote: |
Iam having an input file of variable format...it contains records of different length.I want to process the file(read and write) based on the length. |
Strange but doable.
The llbb is reachable, but care must be used. Input and output records could be defined as ODO variables. A linkage section variable could be set as the address of the llbb of the input record. A working storage variable would be the object of the ODOs. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi,
Try the link below. my suggestion is in the last post in the thread.
ibmmainframes.com/viewtopic.php?t=11754&highlight=varying
Or you can put all the 01 rec descriptions in the FD and use the rec-type fields in the recs to decide which datanames to use, as suggested by others earlier. |
|
Back to top |
|
|
|