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

Want solution using FILEAID, for the following problem


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ananthalakshmi

New User


Joined: 14 Dec 2005
Posts: 2

PostPosted: Fri Jul 07, 2006 9:15 am
Reply with quote

Hi,
I want solution using FILEAID, for the following problem.

problem statement:
------------------------

I have an input PS file.
i need to copy that file to another PS file, but after replacing some data in the input file under specific condition( say for e.g., if the 5th position in a record has 'X' replace that by '#'). Also i want to display the details in the SPOOL ,on which all records got changed, or write the information about the changed records in a new PS file.I want to acheive all these using FILEAID.Kindly suggest a solution.


Thanks in Advance,
Ananthalakshmi
Back to top
View user's profile Send private message
cpuhawg

Active User


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

PostPosted: Fri Jul 07, 2006 6:47 pm
Reply with quote

Try this:

Code:

//FILEAID EXEC PGM=FILEAID                               
//SYSPRINT DD  SYSOUT=*
//SYSLIST DD  SYSOUT=*                                 
//DD01     DD DSN=INPUT.FILE,DISP=OLD                   
//DD01O    DD DSN=OUTPUT.FILE,UNIT=SYSDA,DISP=(NEW,CATLG),
// RECFM=??,LRECL=???,BLKSIZE=???,
// SPACE=(TRK,(100,50),RLSE)                                     
//SYSIN    DD  *                                         
$$DD01 CA IF=(5,EQ,C'X'),REPL=(5,C'#'),LIST=0           


This FILEAID does a COPYALL (copies all records) to DD01O. If it finds a X in position 5 of a record, it replaces it with a #. The LIST=0 will print out all the changed records to the SYSLIST output DD statement.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top