Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Want solution using FILEAID, for the following problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Want solution using FILEAID, for the following problem
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    Post subject: Re: Want solution using FILEAID, for the following problem
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us