How to Write Fixed length file as Variable Length file?



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Re: How to Write Fixed length file as Variable Length file?

Postby Alissa Margulies » Fri Aug 19, 2011 12:43 am

Here is an example that should help you achieve the desired output:

//STEP1 EXEC PGM=SORT                       
//SYSOUT  DD SYSOUT=*                       
//SORTOUT DD SYSOUT=*                       
//SORTIN  DD *                               
4917 WWW BBBBB LN           AAA  AAAAA  AAAA
15575 SSSSS HHYR            BBB BBBB BBBB   
6357 OOOO OOOO OO           CCC CCC CCC     
16 COOOOO SSSSSS            SDSDSD SDSDSD   
1523 45TH ST                GHGHG   GHGG     
//SYSIN   DD *                               
  SORT FIELDS=COPY                           
  OUTFIL BUILD=(1,28,JFY=(VL),C'|',         
                29,20,JFY=(VL),C'|',         
                21,8,JFY=(VL),C'|'),FTOV     
/*

This is the output produced from the above sort step:
4917 WWW BBBBB LN|AAA  AAAAA  AAAA||
15575 SSSSS HHYR|BBB BBBB BBBB||   
6357 OOOO OOOO OO|CCC CCC CCC||     
16 COOOOO SSSSSS|SDSDSD SDSDSD||   
1523 45TH ST|GHGHG   GHGG||         
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Re: How to Write Fixed length file as Variable Length file?

 

Re: How to Write Fixed length file as Variable Length file?

Postby pjagathis » Tue Aug 23, 2011 11:42 am

Hi Alissa,

Thanks..

But both my input and output file are FB file.Your understanding is correct.

Below code does what I need when my output file is VB, But my both input and output file are FB file

Please help me...
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to Write Fixed length file as Variable Length file?

Postby Alissa Margulies » Thu Aug 25, 2011 8:11 pm

Hello pjagathis.

The use of JFY=(VL) requires the output record to be variable-length. You can convert the file to FB in a successive copy step.

Regards,
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: How to Write Fixed length file as Variable Length file?

Postby pjagathis » Fri Aug 26, 2011 1:04 pm

Hi Alissa,

ThanX...

Whether we can do it single step ?.. Is possible..

Since if we do it for multiple files, then this will increase the number of steps....

any other option which willl convert in single step?
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to Write Fixed length file as Variable Length file?

Postby dick scherrer » Sat Aug 27, 2011 12:11 am

Hello,

Why do you care if this is one or multiple steps? The same amount of data will still be processed.

If you use multiple steps, it will probably be easier for people to understand.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Previous

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post