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
 

 

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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Problem with GETMAIN command amitc23 CICS 6 Thu Sep 01, 2016 1:01 pm


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