View previous topic :: View next topic
|
Author |
Message |
saidharrao Warnings : 1 New User
Joined: 19 Feb 2005 Posts: 27 Location: hyderabad-ap-india
|
|
|
|
If anybody knows SELCOPY,
can you pls help me..
My problem is:-
I have an input file (flat file) of length 80 bytes -FB.
The file cosists of 6 fields. One of the filed is 'Amount' & starts from 11 th position of the input file. Now I have to read this file, change the amount field ( for all the records) by multiplying with 26 and I need to write all these records to a new output file..
Can anyone tell me how to do this? Your immediate and qucik answer is highly appreciated as I need to deliver this tomorrow.
Thanks and Regartds,
Saidarao. |
|
Back to top |
|
|
kanda3
New User
Joined: 03 Sep 2005 Posts: 1
|
|
|
|
Hi,
Try the following:
READ INFILE LRECL 80 BLKSIZE 800
MULT 3 AT 1 BY 2
WRITE OUTFIL BLKSIZE=800
Where MULT 3 AT 1 By 2 means, Amount field is 3bytes long and is located at pos 1 which is multiplied by 2.
Amount field must be in packed decimal. |
|
Back to top |
|
|
saidharrao Warnings : 1 New User
Joined: 19 Feb 2005 Posts: 27 Location: hyderabad-ap-india
|
|
|
|
Thank you Kanda,
I have just seen your mail. I kept on watching till 3 days from the day I posted. I learned myself and did the same as it was an urgent task and nobody has replied. It went on live and working fine.
Now my new problem is to compare twoo files and merge them if matches..I have to do this using selcopy and both the files are flat files..
Cheers, |
|
Back to top |
|
|
|