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

File-aid modify option


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pyari

New User


Joined: 07 May 2008
Posts: 4
Location: Hyderabad

PostPosted: Thu May 08, 2008 3:40 pm
Reply with quote

Hi all,

Is there any option in file-aid to modify all the records at a time?
i.e., i had around 2000 records to modify[i have to modify the entire file for a single column].

Thanks,
Pyari
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu May 08, 2008 5:18 pm
Reply with quote

You can use the following option. I have tried this in ISPF panel only, not in FILE-AID.

C colomn-no 'original-value' 'to-be-changed-value' ALL

e.g., C 1 '001' '002' ALL

Where 1 is the colomn-number
001 is the original value and
002 is the to-be-changed-value

KSK
Back to top
View user's profile Send private message
Pyari

New User


Joined: 07 May 2008
Posts: 4
Location: Hyderabad

PostPosted: Thu May 08, 2008 6:01 pm
Reply with quote

But mine is a VSAM file
we can't modify it directly so.......
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 09, 2008 4:15 am
Reply with quote

Hello,

First - back up the file.

Second, using fileaid you should be able to edit the dadtaset and globally change the value you need to change.

Once you have a backup, i'd suggest creating a new, test vsam file to make sure you can do what you want with no problems/questions. Once you have verified your solution, then go ahead and schedule changing the real file.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri May 09, 2008 10:10 am
Reply with quote

Pyari,

If your file is VSAM, edit it in File-Aid. This command should work in File-Aid also.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri May 09, 2008 11:14 am
Reply with quote

Pyari wrote:
Hi all,

Is there any option in file-aid to modify all the records at a time?
i.e., i had around 2000 records to modify[i have to modify the entire file for a single column].

Thanks,
Pyari


can u provide some sample input and expected output data.
Back to top
View user's profile Send private message
Pyari

New User


Joined: 07 May 2008
Posts: 4
Location: Hyderabad

PostPosted: Fri May 09, 2008 4:29 pm
Reply with quote

Hi KSK/Sri_mf

I tried with that command, its working fine.
But my input looks like
90 2150
90 2150
90 2150
90 2150
90 2150

After value 90, file has some junk value.
Actually that is a comp-3 variable, and when i opend that in file-aid some junk is there in that 2spaces,

Because of that i am getting S0C7 abend, so i am passing some valid values to that field.

But my input file has 10k records, so how can i modify all those values at a time?

I tried with the command as C 3 ' ' '929' ALL
But its not working with this field
So how can i change all the junk values to valid values?
Back to top
View user's profile Send private message
cpuhawg

Active User


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

PostPosted: Fri May 09, 2008 6:04 pm
Reply with quote

FILEAID can update VSAM files in place. You definitely want to back up your VSAM file before running the FILEAID program as Dick suggested.

Code:

//FILEAID EXEC PGM=FILEAID                               
//SYSPRINT DD  SYSOUT=*                                   
//DD01     DD DISP=SHR,DSN=INPUT.VSAM.FILE
//SYSIN    DD  *                                         
$$DD01 UPDATE IF=(1,EQ,C'VALUE1'),                     
       REPL=(1,C'VALUE2')                               
/*                                                       


If it finds VALUE1 in position 1, it will replace the field with VALUE2.
Back to top
View user's profile Send private message
Pyari

New User


Joined: 07 May 2008
Posts: 4
Location: Hyderabad

PostPosted: Fri May 09, 2008 7:55 pm
Reply with quote

I will try with this code
Thanks alot for your response
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top