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

Variable record length ( In JCL)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anand78

New User


Joined: 06 Mar 2006
Posts: 50
Location: PUNE

PostPosted: Tue Jun 20, 2006 11:36 am
Reply with quote

Hi All,

Can any one tell me about how to specify DCB parameters for variable record length?

Input file is of VB
Output file is to be created with FB recfm.

I will more greatful if anybody send more information about this topic.

plese do reply..

Regards
Anand
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jun 20, 2006 2:09 pm
Reply with quote

For variable record length the DCB parametere can be

RECFM=V
LRECL is the logical record length
BLKSIZE equals LRECL plus 4.
Back to top
View user's profile Send private message
shekhar1s

New User


Joined: 13 Apr 2006
Posts: 14
Location: USA

PostPosted: Tue Jun 20, 2006 2:44 pm
Reply with quote

DCB For Variable length record....
DCB=(DSORG=PS,LRECL=80,RECFM=VB,BLKSIZE=800)
Block size should be in multiples of record length. And as per my knowledge.. it automatically takes the four bytes when we declare the record format as VB(variable length).

And About output file... u can create it in the JCL itself or using 3.2 option..

please let me know if i'm wrong....
Thanks
Shekhar
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Tue Jun 20, 2006 7:11 pm
Reply with quote

Hi Anand,

Quote:
Hi All,

Can any one tell me about how to specify DCB parameters for variable record length?

Input file is of VB
Output file is to be created with FB recfm.

I will more greatful if anybody send more information about this topic.

plese do reply..

Regards
Anand


As per your query, ur Input is VB then u can mention in JCL as SHR and no need to mention DCB parameter.

Hope this helps

Regards
Rupesh
Back to top
View user's profile Send private message
Husna

New User


Joined: 02 Jun 2006
Posts: 49

PostPosted: Wed Jun 21, 2006 10:06 am
Reply with quote

Hi,

Will you please let me know about the four bytes when we declare the record format as VB(variable length). It will store the variable length at the begining of the first four bytes or end of the last four bytes.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Jun 21, 2006 12:02 pm
Reply with quote

It will store the length in first 4 bytes
Back to top
View user's profile Send private message
sathish_seabiscuit

New User


Joined: 14 Jun 2006
Posts: 4

PostPosted: Wed Jun 21, 2006 5:52 pm
Reply with quote

We can use ICEGENER utility.

In the code,
RIS&ENV..P370.UNLOAD.RECIPTSI.BSAM - Variable length file
RIS&ENV..P370.RECIPTSI.BSAM -Fixed length file
RISL3701 is given at last.

//ICEGEN01 EXEC PGM=ICEGENER,COND=(04,LT)
//*
//SYSUT1 DD
DSN=RIS&ENV..P370.UNLOAD.RECIPTSI.BSAM,
// DISP=SHR
//SYSUT2 DD DSN=RIS&ENV..P370.RECIPTSI.BSAM,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=173),
// SPACE=(173,&SPMED.,RLSE),
// UNIT=&UNITWRK
//SYSIN DD DSN=&QUAL..PARMLIB(RISL3701),
// DISP=SHR
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=Z
//*

Parm RISL3701,

GENERATE MAXFLDS=1
RECORD FIELD=(173,1)
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: Wed Jun 21, 2006 8:32 pm
Reply with quote

Quote:
Will you please let me know about the four bytes when we declare the record format as VB(variable length). It will store the variable length at the begining of the first four bytes or end of the last four bytes.


The first four bytes of every VB record is the Record Descriptor Word (RDW). The first two bytes of the RDW contain the record length in binary usually followed by two bytes of binary zeros. For example, an 80-byte VB record will have an RDW of X'00500000'.
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Thu Jun 22, 2006 12:33 pm
Reply with quote

Frank,
This one has always nagged me - what are the 2 bytes of binary zeros used for? I've always been told "It is for IBM purposes"! Could you explain?
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: Thu Jun 22, 2006 8:46 pm
Reply with quote

For a VB file the two bytes are not used for anything. But for a variable spanned (VBS, VS) file, the first four bytes are an SDW (segment descriptor word) rather than an RDW. In the SDW, the first two bytes are the length in binary, but the third byte contains the segment control code (first, middle, last). For more information on the SDW, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2d440/3.1.3.2.2?SHELF=EZ2ZO10G&DT=20050602124524&CASE=
Back to top
View user's profile Send private message
puneet478

New User


Joined: 03 Jan 2006
Posts: 13
Location: Bangalore india

PostPosted: Fri Jun 23, 2006 4:43 am
Reply with quote

Hi,

The DCB will look like as follows:

//M57Tst DD DSN=input.data.set,
// DISP=(NEW,CATLG,DELETE),
// UNIT=TSODA,DATACLAS=STANDARD,
// DCB=(RECFM=VB,LRECL=704,BLKSIZE=0),
// EXPDT=2007/350

You can change the LRECL and EXPDT fields.

Hope this will help.

- Puneet
Back to top
View user's profile Send private message
cjcpr

New User


Joined: 21 Mar 2006
Posts: 21
Location: USA

PostPosted: Fri Jul 07, 2006 10:56 pm
Reply with quote

simple solutio n is using a OUTREC field with CONVERT parameter.
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: Fri Jul 07, 2006 11:32 pm
Reply with quote

See the following Smart DFSORT Trick for converting VB to FB:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst01.html#t11

See the following Smart DFSORT Trick for converting FB to VB:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t09
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 -> JCL & VSAM

 


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 PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top