MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
detchoi Beginner Joined: 01 Mar 2006 Posts: 2 Topics: 1
Posted: Wed Mar 01, 2006 9:39 pm Post subject: Replace String With Comma on All Members of a PDS
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
Ravi Beginner Joined: 27 Jun 2005 Posts: 88 Topics: 2
Posted: Thu Mar 02, 2006 1:00 am Post subject:
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.
Back to top
Phantom Data Mgmt Moderator Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Thu Mar 02, 2006 1:12 am Post subject:
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
Ravi Beginner Joined: 27 Jun 2005 Posts: 88 Topics: 2
Posted: Thu Mar 02, 2006 1:23 am Post subject:
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
detchoi Beginner Joined: 01 Mar 2006 Posts: 2 Topics: 1
Posted: Thu Mar 02, 2006 7:58 am Post subject:
Thanks Ravi and Phantom. I try your suggestions and both worked perfectly.
Det
Back to top
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