980 pts.
 CVTPFXLS
Can anyone help here pls. I am using the CVTPFXLS command to convert a datafile to xls but the negative packed fields are not getting translated correctly. The negativve signs are dropping out. Cannot see any options on the command. Cheers!

Software/Hardware used:
ASKED: December 1, 2009  4:45 AM
UPDATED: December 4, 2009  10:13 PM

Answer Wiki:
CVTPFXLS is not an IBM command. It is a shareshare command. Here is the link that explains it. http://itknowledgeexchange.techtarget.com/itanswers/as400-to-excel-2/
Last Wiki Answer Submitted:  December 1, 2009  2:34 pm  by  CharlieBrowne   32,785 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,785 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I use this command a lot and have never seen this behavior. How are the fields defined in the file? Can you post a sample of the DDS?

 5,830 pts.

 

Here is the DDS for the file (only the numeric fields are the issue. The negative sign is not being carried thru:
:
A WP1$ 13S 2
A TEXT(‘WP Year -2′)
A NB1$ 13S 2
A TEXT(‘NB Year -2′)
A WP2$ 13S 2
A TEXT(‘WP Year -1′)
A NB2$ 13S 2
A TEXT(‘NB Year -1′)
A WP3$ 13S 2
A TEXT(‘WP Year 0′)
A NB3$ 13S 2
A TEXT(‘NB Year 0′)
A WPP$ 5S 2
A TEXT(‘WP % Change’)
A NBP$ 5S 2
A TEXT(‘NB % Change’)

 980 pts.

 

This is apparently a non-IBM freebee
There was a PTF issued for this issue – you want to find it or a latter version of the software. Google AS/400 CVTPFXLS negative
Phil

 44,060 pts.

 

I have not been able to find the PTF nor a later version of the command. Seems its no longer on the web. Its a fairly straight foward file and can’t see why it cannot handle negatives.
Anyway, I have resolved the problem by converting the numerics to alpha and adding the negative sign myself.
Thanks guys.

 980 pts.

 

I do not define my fields as signed numberic when I create a file. I define everything as packed.

Just for fun, try defining the field as follows and see if that makes a difference.

A WP1$ 13  2   TEXT(’WP Year -2′)
A NB1$ 13   2  TEXT(’NB Year -2′)
A WP2$ 13  2  TEXT(’WP Year -1′)
A NB2$ 13  2   TEXT(’NB Year -1′)
A WP3$ 13  2  TEXT(’WP Year 0′)
A NB3$ 13  2   TEXT(’NB Year 0′)
A WPP$  5  2   TEXT(’WP % Change’)
A NBP$  5  2  TEXT(’NB % Change’)
 5,830 pts.

 

Hi Teandy,

Thanks for your tips. I had the fields as packed intially. When it didn’t work, changed them to zoned which also did not work. Some are saying that it is a known bug and there is a PTF to fix it. But I am not able to find the website from where I got the original. Wonder if anyone can direct me to download the later version of the command.
Thanks.

 980 pts.

 

What is the creation date of your CVTPFXLS command? Mine is as follows:

Creation date/time . . . . . . . . . :   02/18/03  11:14:04   
Created by user  . . . . . . . . . . :   NUBLA_A              
System created on  . . . . . . . . . :   PSI#E                
Object domain  . . . . . . . . . . . :   *SYSTEM              
 5,830 pts.

 

The same date – 18/02/03. So we seem to have the same version.

 980 pts.

 

I use this command all the time and have never seen what you describe.

At this point the only thing I can think of would be to restore the original save file and see if that fixes your problem.

 5,830 pts.