View previous topic :: View next topic
|
Author |
Message |
Malini Raju
New User
Joined: 02 Dec 2009 Posts: 3 Location: Hyderabad
|
|
|
|
Hi all .. My requirement is that , my input file contains only one record of 200 byte length in one line and i need to split this single line into "n" lines of 80 byte each
for eg :
ABCDEFGHIJKLMNOPQRSTUVWXYZ - INPUT FILE contain this record
My OUTFILE FILE should be of below format
ABCDEFGH
IJKLMNOPQ
RSTUVWXY
Z |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
this might assist
Code: |
//SORT0001 EXEC PGM=SORT
//SORTIN DD *
ABCDEFGHIJKLMNOPQRSTUVWXYZ
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(1,8,80:X,/,9,9,/,18,8,/,26,1)
/*
|
Gerry |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And do please use a relevant title to your thread. |
|
Back to top |
|
|
Malini Raju
New User
Joined: 02 Dec 2009 Posts: 3 Location: Hyderabad
|
|
|
|
hi Gerry ,
Thanks for your quick response. As per My requirement my input record length is 1000 byte (in a single line ) and this single line needs to be split up into "n" number of lines of 80 byte each into a single output file. |
|
Back to top |
|
|
Malini Raju
New User
Joined: 02 Dec 2009 Posts: 3 Location: Hyderabad
|
|
|
|
Thanks Gerry
Code: |
OPTION COPY
OUTFIL BUILD=(1,80,2000:X,/,81,80,/,161,80,/,241,80) |
It worked fine |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I adore wishy-washy posts
Quote: |
My requirement is that , my input file contains only one record of 200 byte length in one line and i need to split this single line into "n" lines of 80 byte each |
Quote: |
As per My requirement my input record length is 1000 byte (in a single line ) and this single line needs to be split up into "n" number of lines of 80 byte each into a single output file.
|
I wonder why people are not capable of expressing clearly their requirement from the beginning of a thread |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Just to test if one can answer a sample first.. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
enrico-sorichetti wrote: |
I wonder why people are not capable of expressing clearly their requirement from the beginning of a thread |
Because those same people are taught that agile project "management" methodologies are actually acceptable in a business environment |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
My requirement my input record length is 1000 byte (in a single line ) and this single line needs to be split up into "n" number of lines of 80 byte each into a single output file. |
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use the new RESIZE operator of DFSORT's ICETOOL to do this quite easily like this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/1000)
//OUT DD DSN=... output file (FB/80)
//TOOLIN DD *
RESIZE FROM(IN) TO(OUT) TOLEN(80)
|
For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|
Back to top |
|
|
|