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
 
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 Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am

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