Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Access first 4 bytes in a file with RECFM=VB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Access first 4 bytes in a file with RECFM=VB
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: 3158
Location: Tucson AZ

PostPosted: Mon Dec 18, 2006 9:02 pm    Post subject:
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 Moderator


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

PostPosted: Mon Dec 18, 2006 9:27 pm    Post subject:
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    Post subject: Re: Access first 4 bytes in a file with RECFM=VB
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us