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
 

 

Can CHANGE command be used without NOMATCH parameter .

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Thu Sep 13, 2007 10:04 am    Post subject: Can CHANGE command be used without NOMATCH parameter .
Reply with quote

Hi,

I have an i/p file as follows :

AAAAA111SDF***SDF
BBBBB222SDF***SDG
BBBBB444SDFSGFSDG
BBBBB222SDFSGFSDG
BBBBB555SDF***SDG
AAAAA111DFG***H

Now i want to change 'AAA' from 1st position to 'Y' . So i used CHANGE command. But if the 1st pos has 'BBB' i want to keep it as in i/p , i.e. in o/p it should appear as 'BBB' and wherever it's 'AAA' it should appear as 'Y' . Can anyone tell me if this can be possible with CHANGE syntax . Can a CHANGE syntax be used without NOMATCH parameter. If so then my problem will be solved. Please let me know the syntax also.
Back to top
View user's profile Send private message

ParagChouguley

Active User


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

PostPosted: Thu Sep 13, 2007 6:47 pm    Post subject:
Reply with quote

Hi Ambili S,

Code:

//STEP1   EXEC PGM=SORT                                   
//SORTIN  DD *                                             
AAAAA111SDF***SDF                                         
BBBBB222SDF***SDG                                         
BBBBB444SDFSGFSDG                                         
BBBBB222SDFSGFSDG                                         
BBBBB555SDF***SDG                                         
AAAAA111DFG***H                                           
//SORTOUT DD SYSOUT=*                                     
//SYSOUT  DD SYSOUT=*                                     
//SYSPRINT DD SYSOUT=*                                     
//SYSOUZ  DD SYSOUT=*                                     
//SYSIN   DD *                                             
     OPTION COPY                                       
     OUTREC FIELDS=(1,3,CHANGE=(3,C'AAA',C'Y  '),     
     NOMATCH=(1,3),4,17)                               
/*                                                     


Output:
Code:

Y  AA111SDF***SDF 
BBBBB222SDF***SDG 
BBBBB444SDFSGFSDG 
BBBBB222SDFSGFSDG 
BBBBB555SDF***SDG 
Y  AA111DFG***H   


--Parag
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 13, 2007 7:38 pm    Post subject: Reply to: Can CHANGE command be used without NOMATCH paramet
Reply with quote

You can also use INREC OVERLAY for your requirement

Code:

//S1    EXEC  PGM=ICEMAN                                               
//SYSOUT    DD  SYSOUT=*                                               
//SORTIN DD *                                                           
AAAAA111SDF***SDF                                                       
BBBBB222SDF***SDG                                                       
BBBBB444SDFSGFSDG                                                       
BBBBB222SDFSGFSDG                                                       
BBBBB555SDF***SDG                                                       
AAAAA111DFG***H                                                         
/*                                                                     
//SORTOUT DD DSN=OUTPUT.PS.NAME,DISP=(,CATLG,CATLG)       
//SYSIN    DD    *                                                     
  OPTION COPY                                                           
  INREC OVERLAY=(1:1,3,CHANGE=(3,C'AAA',C'Y  '),                       
  NOMATCH=(1,3))                                                       
/*                                                                     


Output

Code:

Y  AA111SDF***SDF     
BBBBB222SDF***SDG     
BBBBB444SDFSGFSDG     
BBBBB222SDFSGFSDG     
BBBBB555SDF***SDG     
Y  AA111DFG***H       
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: Thu Sep 13, 2007 9:28 pm    Post subject:
Reply with quote

Or IFTHEN:

Code:

  OPTION COPY                                               
  INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'AAA'),OVERLAY=(1:C'Y  ')) 
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Fri Sep 14, 2007 9:07 am    Post subject:
Reply with quote

Hi

Thanks for the solutions. It has worked.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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