Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL to split the line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL to split the line
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: 1703
Location: Australia

PostPosted: Wed Dec 02, 2009 3:27 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 02, 2009 3:30 pm    Post subject:
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    Post subject: Splitting record in a single file of fixed length
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Dec 02, 2009 5:13 pm    Post subject: Reply to: JCL
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

Senior Member


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

PostPosted: Thu Dec 03, 2009 5:04 pm    Post subject:
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: 1753
Location: Bloomington, IL

PostPosted: Thu Dec 03, 2009 6:48 pm    Post subject: Re: Reply to: JCL
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 05, 2010 2:47 am    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am
No new posts Increase the screen size after split mistah kurtz TSO/ISPF 2 Fri Sep 02, 2016 6:39 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us