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

JCL to split the line


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

New User


Joined: 02 Dec 2009
Posts: 3
Location: Hyderabad

PostPosted: Wed Dec 02, 2009 3:11 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Dec 02, 2009 3:27 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Dec 02, 2009 3:30 pm
Reply with quote

And do please use a relevant title to your thread.
Back to top
View user's profile Send private message
Malini Raju

New User


Joined: 02 Dec 2009
Posts: 3
Location: Hyderabad

PostPosted: Wed Dec 02, 2009 4:19 pm
Reply with quote

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
View user's profile Send private message
Malini Raju

New User


Joined: 02 Dec 2009
Posts: 3
Location: Hyderabad

PostPosted: Wed Dec 02, 2009 5:12 pm
Reply with quote

Thanks Gerry

Code:
OPTION COPY                                           
OUTFIL BUILD=(1,80,2000:X,/,81,80,/,161,80,/,241,80)   


It worked fine icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Dec 02, 2009 5:13 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 03, 2009 5:04 pm
Reply with quote

Just to test if one can answer a sample first..icon_biggrin.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Dec 03, 2009 6:48 pm
Reply with quote

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 icon_evil.gif
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 Nov 05, 2010 2:47 am
Reply with quote

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
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts JCL/SORT to Split Records SYNCSORT 28
Search our Forums:

Back to Top