IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Access first 4 bytes in a file with RECFM=VB


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jagankallis
Warnings : 1

New User


Joined: 28 Jun 2006
Posts: 29
Location: DUISBURG

PostPosted: Mon Dec 18, 2006 7:08 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Dec 18, 2006 9:02 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Dec 18, 2006 9:27 pm
Reply with quote

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
View user's profile Send private message
jagankallis
Warnings : 1

New User


Joined: 28 Jun 2006
Posts: 29
Location: DUISBURG

PostPosted: Wed Dec 20, 2006 3:01 am
Reply with quote

Thanks a lot for the immediate response to William and Frank ! Both the replies are very useful.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top