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 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 Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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