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

HOW TO REPEAT LINES USING SORT UTILITY


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
scorp_rahul22
Currently Banned

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 07, 2007 4:55 pm
Reply with quote

Is there any way to copy lines

Code:

Aaaaaaaaaaaaaaaaaaaaaaaaa
............................................bbbbbbbbbbbbbbbb
............................................cccccccccccccccccc


I want to copy like

Code:

Aaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbb
Aaaaaaaaaaaaaaaaaaaaaaaaacccccccccccccccccc
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 Dec 07, 2007 10:10 pm
Reply with quote

You can use a DFSORT/ICETOOL job like this to do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD *
Aaaaaaaaaaaaaaaaaaaaaaaaa
............................................bbbbbbbbbbbbbbbb
............................................cccccccccccccccccc
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(80,1,CH) -
 WITHALL WITH(26,20) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,25,26:45,20,80:X)
/*
Back to top
View user's profile Send private message
scorp_rahul22
Currently Banned

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Mon Dec 17, 2007 2:34 pm
Reply with quote

sUPPOSE I HAVE INPUT AS


(I st line) Aaaaaaaaaaaaaaaaaaaaaaaa123456789
(2nd line)............................................bbbbbbbbbbbbbbbb
(3rd line)............................................cccccccccccccccccc

in this first line size is not fixed it can be more or less but it will be in range of (1--70)


I want output as



(2nd line)Aaaaaaaaaaaaaaaaaaaaaaaa123456789bbbbbbbbbbbbbbbb
(3rd line)Aaaaaaaaaaaaaaaaaaaaaaaa123456789cccccccccccccccccc



Can you please tell hw to ;proceed on that as i m cnfused on this.
Back to top
View user's profile Send private message
scorp_rahul22
Currently Banned

New User


Joined: 06 Aug 2007
Posts: 42
Location: chennai

PostPosted: Mon Dec 17, 2007 5:08 pm
Reply with quote

I AM STILL FACING ISSUES IN THAT
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 17, 2007 9:28 pm
Reply with quote

Hello,

TURN OFF your CAPS. . . .

Post what issues you are still facing. . . .
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: Mon Dec 17, 2007 10:08 pm
Reply with quote

Rahul,

It's not clear what you want to do.

What is the RECFM and LRECL of the input file?

What is the starting position and length of the field in the second and third lines?

Quote:
in this first line size is not fixed it can be more or less but it will be in range of (1--70)


Do you mean that the field in the first record can have different numbers of trailing blanks, so for example one record might have 'ABC' followed by 67 blanks and another record might have 'QRSTUV' followed by 64 blanks?

Are you trying to squeeze out the blanks between the 70 byte field in the first record and the fields in the second record, e.g.

Code:

ABCbbbbbbbbbbbbbbbb
QRSTUVbbbbbbbbbbbbbbbb


or are you trying to do something else? Please explain more clearly with a better example of input and output. Use code tags around your example records.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts REASON 00D70014 in load utility DB2 6
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top