IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ISPF-How to change one word in 50 members which r in one PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vkrajuch

New User


Joined: 22 Jun 2005
Posts: 5
Location: hyderabad

PostPosted: Wed Dec 14, 2005 12:09 pm
Reply with quote

Hi Friends,



I am having more than 50 members in a PDS,

I want to change one word which are in those 50 members, are in one PDS.
Is there any command for changing the word in all those members in the PDS.

Thanks & Regards,
Vijay
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Dec 14, 2005 12:33 pm
Reply with quote

Hi frnd,
Using 3.14 or 3.15 there is an option like SUPERC using that i think so v can do... i m not clear... i know that v can search the particular word in all the 50 members.. but i m not sure of that replacing.. let me try and let me know if possible..
Back to top
View user's profile Send private message
Paddy

New User


Joined: 12 Sep 2005
Posts: 46
Location: Paris France

PostPosted: Wed Dec 14, 2005 12:39 pm
Reply with quote

Hi Vijay

I think to use FILEAID is better way for your problem. If FILEAID is not implemented on your shop u can make a rexx who call an ispf macro.


I hope in this help.

Regards.

Paddy
Back to top
View user's profile Send private message
nallapureddy

New User


Joined: 27 Jul 2005
Posts: 18

PostPosted: Wed Dec 14, 2005 1:23 pm
Reply with quote

open the pds .then issue the command g c all 'abc' 'def'
this will command will change all the occurences of the abc word in the pds to def

please try this and let me know if it works
Back to top
View user's profile Send private message
Ravi gaur

New User


Joined: 12 Jul 2005
Posts: 38

PostPosted: Wed Dec 14, 2005 3:55 pm
Reply with quote

No this command does'nt work,By the way what command it is Tso ?
Back to top
View user's profile Send private message
akashs

New User


Joined: 24 Nov 2005
Posts: 49
Location: chennai

PostPosted: Wed Dec 14, 2005 4:03 pm
Reply with quote

hi Nalla reddy,

u r way of changing the strings is not working.....


regards,
akash
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Wed Dec 14, 2005 5:52 pm
Reply with quote

Hi vkrajuch,

To my understanding you can make use of FILEAID in that use SEARCH and UPDATE option. The procedure is identify the word to be searched and specify the word to be replaced.

Other way is to make use of REXX code as Paddy pointed out.

Hope this helps.
Back to top
View user's profile Send private message
vkrajuch

New User


Joined: 22 Jun 2005
Posts: 5
Location: hyderabad

PostPosted: Wed Dec 14, 2005 6:01 pm
Reply with quote

Hi Friends,,


Thanks for ur immediate reponses...

But in our shop i dotn hv File-aid or neither Rexx.


Thank you

Regards,
Vijay
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Wed Dec 14, 2005 6:16 pm
Reply with quote

Hi vkrajuch,

In that case you need to manually change the particular word for 50 members inside the PDS.

Other solution is someone has to send the REXX code for you. I don't have the code for your problem.
Back to top
View user's profile Send private message
Paddy

New User


Joined: 12 Sep 2005
Posts: 46
Location: Paris France

PostPosted: Wed Dec 14, 2005 8:11 pm
Reply with quote

Hi Vijay,


Clear my doubt, can you execute a rexx code with your user's right ?


Regards

Paddy icon_surprised.gif
Back to top
View user's profile Send private message
saithvis2

New User


Joined: 23 Dec 2005
Posts: 61
Location: Providence , US

PostPosted: Tue Jan 03, 2006 5:54 pm
Reply with quote

HI all,

i have tried the File-aid option once but how do we do the same using rexx code by calling ISPF macro .

Can anyone help me out with this as i am facing the same problem of changing a variable as abc10 to xyz10 in all members of the pds .


Regards
Vishal
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jan 03, 2006 6:49 pm
Reply with quote

Here is my solution:
Code:
/*------------------------------- REXX ------------------------------- 
 * PROGRAM   : C@ALL                                                   
 * FUNCTION  : An example of how to run an edit-macro against all       
 *           : members of PDS.                                         
 * AUTHOR    : OFER                                                     
 * DATE      : 28/03/04                                                 
 * HOW TO USE:                                                         
 *           :                                                         
 *------------------------------------------------------------------*/ 
                                                                       
ARG PDS .                                                               
                                                                       
MAC  = 'TEMPMAC'                               /* Macro name          */
PDS = STRIP(PDS,"B","'")                                               
                                                                       
X = OUTTRAP("LIBMEM.")                         /* Trap output of TSO  */
 ADDRESS TSO "LISTDS '"PDS"' M"                                         
X = OUTTRAP("OFF")                                                     
                                                                       
DO I = 7 TO LIBMEM.0                                                   
  LIBMEM.I = STRIP(LIBMEM.I)                   /* Member name         */
  ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")"   
  SAY I RC LIBMEM.I                                                     
END                                                                     
                                                                       
EXIT                                                                   
                                                                       

And TEMPMAC is:
Code:
/* REXX */

ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "CHANGE ALL 'string1' 'string2'"
C_RC = RC
ADDRESS ISREDIT "END"

EXIT C_RC


O.
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Tue Jan 03, 2006 6:54 pm
Reply with quote

Try this JCl:
Code:

//TJOB JOB (T,B0,SCM),'KANAK',CLASS=T,MSGCLASS=0,       
//            REGION=2048K                                     
//*******************************************************     
//* SATISFYING COND IN IF, MODIFYING RECS AS SPECIFIED IN REPL
//*******************************************************     
//JS010     EXEC  PGM=FILEAID  FORMAT-4: COPY REC TO 2ND FILE 
//SYSOUT    DD SYSOUT=*                                       
//SYSPRINT  DD SYSOUT=*                                       
//DD01      DD DSN=KANAK.SAMPLE.FILE1,DISP=SHR         
//DD01O     DD DSN=KANAK.SAMPLE.FILE1O,               
//             DISP=(MOD,CATLG,CATLG),UNIT=STOR,               
//             SPACE=(TRK,(1,5),RLSE),DCB=(B0.DSCB)           
//SYSIN     DD *                                               
 $$DD01 COPY IF=(5,EQ,C'1'),REPL=(5,C'3'),                     
/*                                                             
//*                                                           


YOu might need to modify the JCL as per you rneed. Please let us know if this solve your problem or if you have any other concerns.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top