Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to change a particular column value in a file using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
levaku
Warnings : 1

New User


Joined: 03 Jul 2008
Posts: 5
Location: chennai

PostPosted: Thu Jul 03, 2008 3:23 pm    Post subject: How to change a particular column value in a file using SORT
Reply with quote

Hi
can anybody suggest me how to change a particular column value in a file.
ex: starting position in 10, length 2,alphanumeric.
As the file is huge i am not able to use C ALL 'SS' 'VV' 10.
please suggest me a general sort using OUTREC concept instead of ICETOOL.
Back to top
View user's profile Send private message

ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Thu Jul 03, 2008 3:52 pm    Post subject:
Reply with quote

Use this sortcard
Code:

//SYSIN  DD *                             
    OPTION COPY                           
    OUTREC IFTHEN=(WHEN=(10,2,CH,EQ,C'SS'),
           OVERLAY=(10:C'VV'))           
/*                                         
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Jul 03, 2008 4:07 pm    Post subject: Re: How to change a particular column value in a file using
Reply with quote

Hi,

Try ds code !

Code:

//R010     EXEC PGM=SORT                               
//SORTIN   DD  *                                       
123 AAAA SS                                     
222 BBBB X2                                           
444 DDDD SS                                           
/*                                                     
//SORTOUT  DD  SYSOUT=*                               
//SYSIN    DD  *                                       
    SORT FIELDS=COPY                                   
    OUTREC OVERLAY=(10:10,2,CHANGE=(2,C'SS',C'VV'),   
    NOMATCH=(C'OO'))                             
/*                                                     
//SYSOUT   DD  SYSOUT=*                               
//SYSUDUMP DD  SYSOUT=A                               
//*                                                   


Code:

Output
123 AAAA VV   
222 BBBB OO   
444 DDDD VV   
Back to top
View user's profile Send private message
levaku
Warnings : 1

New User


Joined: 03 Jul 2008
Posts: 5
Location: chennai

PostPosted: Fri Jul 04, 2008 11:08 am    Post subject: Reply to: How to change a particular column value in a file
Reply with quote

its working!
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jul 04, 2008 11:15 am    Post subject:
Reply with quote

Hi Vaas,

i didn't see anywhere where nomatch was to be changed as well.


Gerry
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Jul 04, 2008 12:02 pm    Post subject:
Reply with quote

gcicchet wrote:
Hi Vaas,

i didn't see anywhere where nomatch was to be changed as well.


Hi Gerry,

Could you plz check "X2" on behalf of "SS" in second Record.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jul 04, 2008 12:26 pm    Post subject:
Reply with quote

Hi,

I maybe missing something but all I can see is a request to change SS to VV in col 10, nothing about X2 to OO


Gerry
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Jul 04, 2008 12:56 pm    Post subject:
Reply with quote

Just for info, I ve given "NOMATCH" condition also !
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us