View previous topic :: View next topic
|
Author |
Message |
jagankallis Warnings : 1 New User
Joined: 28 Jun 2006 Posts: 29 Location: DUISBURG
|
|
|
|
Dear All,
I have a file with LRECL=532 and RECFM=VB.
This file is formed by combination of two files
1) LRECL=532,RECFM=VB and
2) LRECL=173,RECFM=FB
with all the records jumbled with a program.
Now i want to get the file in (2).
Is it possible to get this file in a separate file? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Since a variable record fields= needs to skip the first four bytes, the llbb of the record, couldn't you include/omit on them.
bytes 1 & 2 would be either a X'00AD' or a X'0214' |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Jagannathan B,
You seem to be a little confused about LRECL vs record length. A file has one LRECL (logical record length) which for VB records is the maximum length of the records in that file. Each record has a record length that gives the length of that record. Records can have different lengths with a maximum length equal to the LRECL. So the records from a file with LRECL=532 can have lengths from 5-532 and the records from a file with LRECL=173 can have length from 5-173. Thus, for example, you can't tell if a record with length 80 came from the file with LRECL=532 or the file with LRECL=173.
Now if you're saying that all of the records from the file with LRECL=532 have a length of 532 and all of the records from the file with LRECL=173 have a length of 173, then you could get the 173 byte records using this DFSORT INCLUDE statement:
Code: |
INCLUDE COND=(1,2,BI,EQ,+173)
|
But that would be unusual for a VB file since having different record lengths is kind of the point of using a VB file. |
|
Back to top |
|
|
jagankallis Warnings : 1 New User
Joined: 28 Jun 2006 Posts: 29 Location: DUISBURG
|
|
|
|
Thanks a lot for the immediate response to William and Frank ! Both the replies are very useful. |
|
Back to top |
|
|
|