View previous topic :: View next topic
|
Author |
Message |
Pyari
New User
Joined: 07 May 2008 Posts: 4 Location: Hyderabad
|
|
|
|
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 |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
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 |
|
|
Pyari
New User
Joined: 07 May 2008 Posts: 4 Location: Hyderabad
|
|
|
|
But mine is a VSAM file
we can't modify it directly so....... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Pyari,
If your file is VSAM, edit it in File-Aid. This command should work in File-Aid also. |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
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 |
|
|
Pyari
New User
Joined: 07 May 2008 Posts: 4 Location: Hyderabad
|
|
|
|
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 |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
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 |
|
|
Pyari
New User
Joined: 07 May 2008 Posts: 4 Location: Hyderabad
|
|
|
|
I will try with this code
Thanks alot for your response |
|
Back to top |
|
|
|