Show RDW of a VB file.

SyncSort's Sort Product, SyncTool for z/OS, SYNCINIT and SYNCLIST.
Post Reply
Sudhakar
New Member
Posts: 5
Joined: Mon May 19, 2014 10:40 am

Show RDW of a VB file.

Post by Sudhakar »

Hi,

Is there any trick using which I can show the RDW of any VB file on mainframes? Help please.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Show RDW of a VB file.

Post by William Collins »

Lots. Why do you want to do that?

Usually it is only the first half-word of the Record Descriptor Word that you want, the bit that contains the record-length. You won't often want it, but sometimes you do.

Code: Select all

  OPTION COPY
  INREC BUILD=(1,4,1,4,5)
That, with SORT (you have posted in the SyncSORT part of the forum) will insert the RDW before the variable part of the data on a record. If you browse/view/edit the dataset you will see the RDW (four bytes, in binary). If you want to human-readable, you use a conversion from binary, or an EDIT pattern.

The RDW is in two parts. The record-lenthg is 1,2,BI and the IOCS is 3,2,BI and you will really, really, rarely need to see that.
User avatar
Anuj Dhawan
Founder
Posts: 2816
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Show RDW of a VB file.

Post by Anuj Dhawan »

Hi,

On similar lines what William says however, I've used this when I needed to know RDW - I find it convient to see the length in readable format:

Code: Select all

//STEP01   EXEC PGM=SORT          
//SYSIN    DD  *                  
  OPTION COPY                     
  OUTREC BUILD=(1,4,1,2,BI,C'|',5)
//SORTIN   DD  DSN=...VB-file,
//             DISP=SHR           
//SORTOUT  DD  SYSOUT=*           
//SYSOUT   DD  SYSOUT=*
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Venkata Kumar
New Member
Posts: 5
Joined: Wed Jul 30, 2014 12:12 pm

Re: Show RDW of a VB file.

Post by Venkata Kumar »

I've used what William has showed but it shows the blank fields added in the start of the records. Without HEX ON I can't see the length and what is IOCS?
User avatar
Anuj Dhawan
Founder
Posts: 2816
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Show RDW of a VB file.

Post by Anuj Dhawan »

Venkata Kumar wrote:I've used what William has showed but it shows the blank fields added in the start of the records. Without HEX ON I can't see the length and what is IOCS?
William Collins wrote:If you want to human-readable, you use a conversion from binary, or an EDIT pattern.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Show RDW of a VB file.

Post by William Collins »

And Anuj has already shown a way to do the conversion if you try his code.

IOCS stands for Input Output Control System. As a Trainee I was told that was what the second two bytes of the RDW were.

There is a phrase Logical IOCS and another Physical IOCS. LIOCS and PIOCS always sounded like they should be twins from some Greek Myth.

Their only use as far as I know is on "spanned" records, to enable you to know if you have the first record of the span, the last, or one in the middle. Except for spanned records, you can assume they will be binary zero.
Sudhakar
New Member
Posts: 5
Joined: Mon May 19, 2014 10:40 am

Re: Show RDW of a VB file.

Post by Sudhakar »

Thanks William.

I read 2nd and 3rd line of your reply at least 4 times and I think I still need to read them to understand them. But Thanks for the info.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Show RDW of a VB file.

Post by William Collins »

You can probably forget those two lines. I've never had to use that particular information...
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Show RDW of a VB file.

Post by Robert Sample »

I heard, many years ago, that PL/I used the third and fourth bytes of the RDW for something (don't remember what now). However, in reading the DFSMS Using Data Sets manual on the segment descriptor word, it now appears that those bytes will be binary zero unless a variable spanned record is being used.

There are 4 possible values placed in the last 2 bits of the third byte:
00 -- the record is complete
01 -- the record is the first part of a multi-segment record
10 -- the record is the last part of a multi-segment record
11 -- the record is neither the first nor last part of a multi-segment record (ie, middle part)
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SyncSort, SyncTool, SyncGener.”