Show RDW of a VB file.
Show RDW of a VB file.
Hi,
Is there any trick using which I can show the RDW of any VB file on mainframes? Help please.
Is there any trick using which I can show the RDW of any VB file on mainframes? Help please.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Show RDW of a VB file.
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.
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.
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)
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.
- Anuj Dhawan
- Founder
- Posts: 2816
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Show RDW of a VB file.
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:
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.
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.
-
- New Member
- Posts: 5
- Joined: Wed Jul 30, 2014 12:12 pm
Re: Show RDW of a VB file.
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?
- Anuj Dhawan
- Founder
- Posts: 2816
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Show RDW of a VB file.
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.
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.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Show RDW of a VB file.
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.
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.
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.
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.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Show RDW of a VB file.
You can probably forget those two lines. I've never had to use that particular information...
- Robert Sample
- Global Moderator
- Posts: 1900
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Show RDW of a VB file.
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)
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)
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