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
 

 

can I see the first 4 bytes (Length) in any view mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Tue Apr 26, 2005 3:38 am    Post subject: can I see the first 4 bytes (Length) in any view mode
Reply with quote

I understand that records having variable lenght format use the first 4 bytes to store the length. So record length = actual data length + 4 bytes. But I can never see the first 4 bytes in any view mode.Why is this?
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: Tue Apr 26, 2005 9:38 pm    Post subject:
Reply with quote

The first 4 bytes of a VB record (RDW) is hidden by many products. The length of the record is actually in the first two bytes of the 4-byte RDW.

You can use a DFSORT job like the following to see the RDW (in hex) and the rest of the record in EBCDIC (OUT1) and the length (in decimal) and the rest of the record in EBCDIC (OUT2):

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUT1,OUTREC=(1,4,1,4,HEX,C'|',5)
  OUTFIL FNAMES=OUT2,OUTREC=(1,4,1,2,BI,C'|',5)
/*


An example of the output in OUT1 would be:

Code:

00540000|$CBXA FIRST  II072F 1+12341                   
002F0000|$AXX  SECOND BB002F 2+67214FLKDJFLJASDFJASD   
001F0000|$BBXB THIRD  GG002D 2+00005                   


An example of the output in OUT2 would be:

Code:

   84 |$CBXA FIRST  II072F 1+12341                           
   47 |$AXX  SECOND BB002F 2+67214FLKDJFLJASDFJASD           
   31 |$BBXB THIRD  GG002D 2+00005                           
Back to top
View user's profile Send private message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Tue Apr 26, 2005 10:20 pm    Post subject: Re: can I see the first 4 bytes (Length) in any view mode
Reply with quote

Thanx a lot Frank .. that was good!!
The other problem that I have is ...when I take a VB file (oh no not again),and zip it in text mode wtihout any delimiters, what happens to the 4 byte RDW in front of each line????
What should I see when I upzip the file in an ASCII viewer??
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Apr 26, 2005 10:48 pm    Post subject: Re: can I see the first 4 bytes (Length) in any view mode
Reply with quote

You can only keep the VB dataset's RDW values when you zip the file with both the -DATA_TYPE(BINARY) and -SAVE_LRECL(Y) options specified.
Back to top
View user's profile Send private message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Tue Apr 26, 2005 11:00 pm    Post subject:
Reply with quote

Thanx... But using Binary zipping would mean that I can no longer FTP the zip file to my PC and browse it using a normal ASCII viewer,right?
Back to top
View user's profile Send private message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Tue Apr 26, 2005 11:08 pm    Post subject:
Reply with quote

Also . we are using PKZIP to do the zipping. I cud not locate the SAVE_LRECL parameter for this software. However, there seems to be a -ZDW option which can maintain the record lengths in binary mode. Will this work with a VB file?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Apr 26, 2005 11:29 pm    Post subject: Re: can I see the first 4 bytes (Length) in any view mode
Reply with quote

To answer your first question, yes, you will not be able to view the file contents in ASCII.

For your second question, this is from the manual:
Quote:

-SAVE_LRECL
Synonyms Include: -RDW, -USE_SAVED_LRECL, -ZDW

This command is used in combination with -DATA_TYPE(BINARY) during ZIP processing to specify record lengths should be retained with the ZIPPED file. This is particularly useful for files containing variable-length records that need to be restored to their original length during UnZip processing.

-SAVE_LRECL(Y|N)

Y-Yes Specifies that record length information is to be included in the ZIP archive.

N-No Specifies that record length information is not to be included.

It is highly recommended that VSAM files ZIPPED as BINARY should have
-SAVE_LRECL(Y) specified.

-SAVE_LRECL(Y) should always be specified with load modules.

This command does NOT apply to files ZIPPED as TEXT.
Back to top
View user's profile Send private message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Wed Apr 27, 2005 1:16 am    Post subject:
Reply with quote

Thanx a lot for your inputs guys!!!!This has been very helpful!!
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 REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm


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