CPYFRMIMPF and numeric errors

CompTech810
CompTech810 used Ask the Experts™
on
Hi Experts!

I am running into an error when using CPYFRMIMPF and numerics.    When I run the CPYFRMIMPF command I get these errors..  The copy did not complete for reason code 9. When I have the DDS fields all alpha numeric it works.

This is my CPYFRMIMPF code:

0049.00              CPYFRMIMPF FROMSTMF('/ZIP/ZIPFILE.CSV') +              
0050.00                           TOFILE(*CURLIB/&EDTF) MBROPT(*REPLACE) +  
0051.00                           RCDDLM(*LF) STRDLM(*NONE) +              
0052.00                           RMVBLANK(*TRAILING) RPLNULLVAL(*FLDDFT) +
0052.01                           RMVCOLNAM(*YES)                          
 
This is a sample of the data from the ZIPFILE.CSV

zip_code,distance,city,state
15090,99.162,"Wexford","PA"
15084,99.649,"Tarentum","PA"
15006,98.913,"Bairdford","PA"
15015,98.329,"Bradfordwoods","PA"

This is my DDS:

0001.00 0008 A          R ZIPCREC                   TEXT('ZIP RADIUS')
0002.00 0000 A            ZIP              5A         COLHDG('ZIP CODE')
0003.00 0000 A            ZDIST          4P 3     COLHDG('DISTANCE')
0004.00 0000 A            ZCITY        30A         COLHDG('CITY')    
0005.00 0000 A            ZSTATE       4A         COLHDG('STATE')  

Thanks for your help!!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
VP Technology / Senior Consultant
Commented:
zdist should be declared 5P3, since it is 5 total digits, 3 decimal positions.  You have too many digits to fit.

Author

Commented:
OMG.....  I feel like an idiot, brain is fried.   That worked.   Thanks again Gary!
Gary PattersonVP Technology / Senior Consultant

Commented:
Lol.  We've all done it.  Glad I could help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial