AS400 Flat files

25 pts.
Tags:
AS/400 flat file
Hi, I have a flat files which contains address, phone numbers, etc.. i want to update the address (ABC..) and phone numbers (1234..) for all the records commenly which is placed in some position in the file. Can any one suggest me that how it can be done (any qry or program)? - Jack Spenzer
ASKED: July 30, 2009  6:26 AM
UPDATED: July 30, 2009  3:53 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Frequently or one-time

Change effects all records with …

give a couple of examples.

______________________________________________________________
That’s what I thought.
I would do it in interactive sql

but first make a backup of the file!!! this is likely to take a couple of tries

Update filexxx
Set fieldyyy = substring(fieldyyy,1,55)
+ ‘Your Value’
+ substring(fieldyyy, 66, 999

Where 55 was the last char before your change
‘Your Value’ is obviously the new stuff
66 is the start of the unaltered data
999 is the length third part, the length of the record – 65 (or is it 66)

Phil
________________________________________________________________

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Spenzer
    this updation is for one time... Ex. i want to give 'abcdefgh' as name (say position 55 -65) in the flat file for all the records.
    25 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following