MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Replace String With Comma on All Members of a PDS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
detchoi
Beginner


Joined: 01 Mar 2006
Posts: 2
Topics: 1

PostPosted: Wed Mar 01, 2006 9:39 pm    Post subject: Replace String With Comma on All Members of a PDS Reply with quote

Hi,

I would like toreplace a string with comma (REGION=0M,) to only comma (,) on all members of a PDS:

I use the following step but the string was changed to two commas (,,) instead. Could anyone tell me what went wrong?

Code:
//STEP0100 EXEC PGM=FILEAID                                   
//SYSPRINT DD SYSOUT=*                                       
//DD01     DD DSN=MY PDS,
//            DISP=SHR
//SYSIN    DD  *                                             
$$DD01 UPDATE EDITALL=(1,0,C"REGION=0M,",C",")                 
/*   


Thanks,

Det
Back to top
View user's profile Send private message
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Thu Mar 02, 2006 1:00 am    Post subject: Reply with quote

Its simply the logic you have coded..

Your data will look like
Code:
MSGCLASS=X,REGION=0M,NOTIFY=&SYSUID

And you replaced REGION=0M, to a comma(,) so
it becomes
Code:
MSGCLASS=X,,NOTIFY=&SYSUID


Hope this helps. Laughing
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Mar 02, 2006 1:12 am    Post subject: Reply with quote

Det,

Quote:

Could anyone tell me what went wrong?


The fact is nothing went wrong !!!

Lets take an example of REGION parameter in a particular step.
Code:

//STEPnn    EXEC  PGM=pgm1,REGION=0M,DYNAMNBR=200
//.....
//.....


Note: There is already a Comma preceding the Region Parameter (pgm1,)

Now when you change "REGION=0M," by "," you will end up in two commas -
1. The one after PGM1.
2. The one replacing the Region parameter.

So, change your File Aid cards as shown below.
Code:

//SYSIN    DD  *                                             
$$DD01 UPDATE EDITALL=(1,0,C",REGION=0M,",C",")                 
/*


or

Code:

//SYSIN    DD  *                                             
$$DD01 UPDATE EDITALL=(1,0,C"REGION=0M,",C"")                 
/*   


Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Thu Mar 02, 2006 1:23 am    Post subject: Reply with quote

The data can be

PGM=pgm1,REGION=0M,DYNAMNBR=200

PGM=pgm1,REGION=0M

Both the cases CAN be handled..by
Code:
//SYSIN    DD  *                                             
$$DD01 UPDATE EDITALL=(1,0,C",REGION=0M",C"")                 
/*
Back to top
View user's profile Send private message
detchoi
Beginner


Joined: 01 Mar 2006
Posts: 2
Topics: 1

PostPosted: Thu Mar 02, 2006 7:58 am    Post subject: Reply with quote

Thanks Ravi and Phantom. I try your suggestions and both worked perfectly.

Det
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group