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

If anybody knows SELCOPY


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saidharrao
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 27
Location: hyderabad-ap-india

PostPosted: Thu Apr 27, 2006 5:20 pm
Reply with quote

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
View user's profile Send private message
kanda3

New User


Joined: 03 Sep 2005
Posts: 1

PostPosted: Wed May 03, 2006 4:06 pm
Reply with quote

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
View user's profile Send private message
saidharrao
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 27
Location: hyderabad-ap-india

PostPosted: Tue May 16, 2006 2:59 pm
Reply with quote

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
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Inserting records into the empty segm... IMS DB/DC 1
No new posts Selcopy error All Other Mainframe Topics 1
No new posts Problem with SELCOPY All Other Mainframe Topics 9
No new posts Update IMS DB using SELCOPY All Other Mainframe Topics 3
No new posts Repeat read a file from starting afte... All Other Mainframe Topics 7
Search our Forums:

Back to Top