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
 

 

How to Replac char of members in PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Wed Feb 27, 2008 3:15 pm    Post subject: How to Replac char of members in PDS
Reply with quote

How can we replace the one character which is common in all the members of th PDS but not at the fixed position.

I have return the job following job, but its giving RC=04

//S01TCS EXEC PGM=FILEAID,PARM=TSO
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*,DCB=(LRECL=111,RECFM=FB)
//SYSDUMP DD SYSOUT=*
//DD01 DD DSN=BOY1SP.REPL.SOURCE,DISP=SHR
//SYSIN DD *
££DD01 UPDATEALL MEMBERS=ALL,
EDIT=(2,1,2,C'A')


Can anyone suggest the solution for this.
Back to top
View user's profile Send private message

cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Feb 27, 2008 7:19 pm    Post subject: Reply to: How to Replac char of members in PDS
Reply with quote

To protect your PDS, I would do the following. Create a 2nd PDS with the same attributes and the 1st PDS. That way, if there is a problem, your original PDS is intact. DD01 is your input PDS. DD01O is your output PDS.

The @ (at sign) represents the character you are searching for.

The # (pound sign) represents the character you are changing it to.

The control cards will cause every member to be copied from the input PDS to the output PDS. It will seach every line of every member. When it locates the common character you are searching for, it will be replaced by the new character.

Code:

//FILEAID EXEC PGM=FILEAID                           
//SYSPRINT DD  SYSOUT=*                               
//DD01     DD DSN=HLQ.INPUT.PDS,DISP=SHR             
//DD01O    DD DSN=HLQ.OUTPUT.PDS,DISP=SHR           
//SYSIN    DD  *                                     
$$DD01 COPY MEMBERS=ALL,                             
            REPL=(1,0,C'@',C'#')           
Back to top
View user's profile Send private message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Thu Feb 28, 2008 12:06 pm    Post subject: Reply to: How to Replac char of members in PDS
Reply with quote

Hi,

Got the solution for this icon_biggrin.gif . Here is the JCL that might Help someone





000005 //S01TCS EXEC PGM=FILEAID,PARM=TSO
000006 //SYSPRINT DD SYSOUT=*
000007 //SYSLIST DD SYSOUT=*,DCB=(LRECL=111,RECFM=FB)
000008 //SYSDUMP DD SYSOUT=*
000009 //DD01 DD DSN=BOY1SP.REPL.SOURCE,DISP=SHR
000010 //SYSIN DD *
000011 ££DD01 UPDATEALL MEMBERS=ALL,
000012 EDITALL=(0,1,C'A',C'2')
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts conversion from char to packed decimal Musab Ahmed DFSORT/ICETOOL 7 Fri Apr 08, 2016 1:12 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts Converting field from char to number danylele74 DB2 4 Tue Mar 29, 2016 4:24 pm


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