IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Apr 26, 2005 9:38 pm
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
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

Global Moderator


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

PostPosted: Tue Apr 26, 2005 10:48 pm
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
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
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

Global Moderator


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

PostPosted: Tue Apr 26, 2005 11:29 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top