convert file VB TO FIXED FILE with logical length in firt po



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

convert file VB TO FIXED FILE with logical length in firt po

Postby jeugenio » Mon Dec 13, 2010 10:54 pm

Hello,

I would like to convert a variable File (VB) to a fixed file. But i want that in the fixed file i have in the first position the logical length of the varible file (vb).

Thank you for all,
jeugenio
 
Posts: 6
Joined: Mon Dec 13, 2010 10:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby Frank Yaeger » Mon Dec 13, 2010 11:22 pm

What format do you want the length in? If you use only one position for the length, that will limit you to a maximum length of 255 (BI), or 99 (ZD). Be more specific about what you want exactly.

What is the LRECL of the VB input file? What do you want for the LRECL of the FB output file?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby jeugenio » Tue Dec 14, 2010 2:54 am

My lRECL of the VB input file is 618, 4 firt position i can´t see because these position are logical length. this logical length i want in the FB with LRECL 618.

Exemple:

VB:

ABCDEFGHIJK

FB

0011ABCDEFGHIJK
jeugenio
 
Posts: 6
Joined: Mon Dec 13, 2010 10:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby dick scherrer » Tue Dec 14, 2010 3:06 am

Hello,

How will placing the length within the data be useful?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby Frank Yaeger » Tue Dec 14, 2010 6:15 am

i want that in the fixed file i have in the first position the logical length of the varible file (vb).


I guess you meant you want the readable logical length starting in the first position. The RDW in the first four bytes actually contains the binary length in the first two bytes and zeros in the third and fourth bytes. You can use a DFSORT job like the following to do what I think you're asking for:

//S1 EXEC PGM=SORT                                                 
//SYSOUT DD SYSOUT=*                                               
//SORTIN DD DSN=...  input file (VB/618)         
//SORTOUT DD DSN=...  output file (FB/618)     
//SYSIN DD *                 
  OPTION COPY                                     
  OUTFIL VTOF,BUILD=(1,2,BI,EDIT=(TTTT),5,614)   
/*                 
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby dick scherrer » Tue Dec 14, 2010 10:16 am

Hi Frank,

I'm still curious just why this is wanted. . .

Seems like a waste of processing as well as an extra copy of the entire file. . .

Maybe TS will clarify.

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby jeugenio » Wed Dec 15, 2010 5:14 pm

Thanks.

I want this issue because i need to send this file with the length of record in the file to a delayer and it has this specification to receipt file.
jeugenio
 
Posts: 6
Joined: Mon Dec 13, 2010 10:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert file VB TO FIXED FILE with logical length in firt po

Postby dick scherrer » Thu Dec 16, 2010 1:50 am

Thanks for the clarification :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post