Page 1 of 1

Show RDW of a VB file.

Posted: Thu Oct 09, 2014 9:48 am
by Sudhakar
Hi,

Is there any trick using which I can show the RDW of any VB file on mainframes? Help please.

Re: Show RDW of a VB file.

Posted: Thu Oct 09, 2014 12:33 pm
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.

Re: Show RDW of a VB file.

Posted: Thu Oct 09, 2014 3:40 pm
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=*

Re: Show RDW of a VB file.

Posted: Mon Oct 13, 2014 2:28 pm
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?

Re: Show RDW of a VB file.

Posted: Tue Oct 14, 2014 2:24 pm
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.

Re: Show RDW of a VB file.

Posted: Tue Oct 14, 2014 4:33 pm
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.

Re: Show RDW of a VB file.

Posted: Fri Nov 21, 2014 4:55 pm
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.

Re: Show RDW of a VB file.

Posted: Fri Nov 21, 2014 6:48 pm
by William Collins
You can probably forget those two lines. I've never had to use that particular information...

Re: Show RDW of a VB file.

Posted: Fri Nov 21, 2014 6:49 pm
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)