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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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