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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm


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