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
 

 

HOW TO REPEAT LINES USING SORT UTILITY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: HOW TO REPEAT LINES USING SORT UTILITY
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 Moderator


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

PostPosted: Fri Dec 07, 2007 10:10 pm    Post subject:
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    Post subject: HOW TO REPEAT LINES USING SORT UTILITY
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    Post subject:
Reply with quote

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

Site Director


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

PostPosted: Mon Dec 17, 2007 9:28 pm    Post subject:
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 Moderator


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

PostPosted: Mon Dec 17, 2007 10:08 pm    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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