PDA

View Full Version : CPYFRMIMPF and Negative Numbers



Guest.Visitor
06-07-2001, 05:48 AM
The lack of responses where tells me that perhaps CPYFRMIMPF cannot map negative numbers correctly to the PF numeric fields. What was IBM thinking??? I hope this is just a "user" error on my part. Chris

S.Mildenberger
06-07-2001, 06:16 AM
Chris, I just went and modified a file that I used CPYFRMIMPF on yesterday to have a -1 in a field and when I ran the command the DB file has a -1 in it. The field is defined as packed 7,2. Maybe you have a PTF issue. We are at V4R5 and fairly current on PTF's. My command was CPYFRMIMPF FROMSTMF('/home/carhire/payfix06.txt') TOFILE(RMIPAYABLE) MBROPT(*REPLACE) RCDDLM(*CRLF) STRDLM(*NONE) which looks just like yours. Scott Mildenberger P.S. I just went and created a PF like yours and imported a file just like yours and everything worked correctly for me.

Guest.Visitor
06-07-2001, 08:01 AM
Scott, Ok, thanks for the feedback. I will look for a PTF. Chris

Guest.Visitor
06-08-2001, 07:01 AM
Scott, PTF SF65863 fixed my problem. Thank you for your assistance! Chris

Guest.Visitor
06-08-2001, 07:02 AM
Hi, How can I successfully use CPYFRMIMPF to import negative numbers? If I have a simple .CSV that contains two records like this: ABCDEFGHIJ,12345,123456.789,123,123.4,12345.67 RINGER,-1,-1,-1,-1,-1 The first record imports just fine. But in the second record, the negative ones all end up as negative ZEROS in the PF. Here is my command: CPYFRMIMPF FROMSTMF('as400 emp estimp.csv') TOFILE(RINGER/TESTIMP) MBROPT(*REPLACE) RCDDLM(*CRLF) STRDLM(*NONE) FLDDLM(',') Here is my PF: </pre> TIA100 A 10 TIP50 P 5 0 TIP93 P 9 3 TIZ30 S 3 0 TIZ41 S 4 1 TIZ72 S 7 2 </pre> I get the same results if I attempt to import a tab delimited file. Thanks. Chris