Client Access adding decimal and blank space after numeric fields

Tags:
AS/400
Client Access
iSeries
How can I remove the decimal point and blank spaces during the file transfer process. These are defined as zoned numeric fields. The file is a typical iSeries physical file with both Character and zoned numeric fields. The blank spaces and decimal point do not show when you display the file on the iSeries using the DSPPFM command. However after transferring the file and opening the file in notepad the blank spaces and decimal point have been added to the file. The Operating system is V7R1 and client access is version 6 release 1.


Software/Hardware used:
Iseries V7R1, Client Access V6R1
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    What do you mean by removong "blank spaces"? What do you want in place of blanks?
    36,025 pointsBadges:
    report
  • philpl1jb

    You really want exactly what you see in DSPPFM???

    Can't imagine why.

    Ok

    1.  on the 400 create a physical file wide enough to accommodate your file .. no fields .. just use the CRTPF and put in the width

    2. on the 400 copy your file to the new flat file using CPYF and format *NOCHK

    3. download the new flat file, it should look exactly like DSPPFM


    54,090 pointsBadges:
    report
  • Sharonhynes
    Yes you are correct I want it to look exactly like it does when I do the DSPPFM. You got it and it is not that I could not fix the issue. I would simply change the fields in the file to all character fields and this would resolve issue, programming changes might be needed depending on how the numeric fields are being moved (If z-add was being used it would need to be changed to move). This is similar to what you are suggesting with the CPYF *nochk into a physical, and this would be the simpler way to do fix this issue. However (and I should have put this in original question) this file has not been changed since 04/05/14. This is the creation date on the object/file. They have been successfully downloading this same file every month for years without issues. According to the users the last successful download of this file was 03/18/15. Since this time it has put the decimal position in and the blank space in front of numeric fields. I did some research on line and found that when you transfer a file using client access with format “ASCII Text” it will put the extra space in front of the numeric fields and this is there to indicate negative or positive sign. If positive this position is left blank and it will also add the decimal point. What I am thinking is that either something happened to their file transfer or they changed it. However they do not have an old copy of it and I have tried a few things but I have had no luck so far. My other thought is that “client access” had some changes with the last release and an they loaded a new version or there is a system value on the Iseries or something in the Iseries operating system that would direct how to convert the file when client access is being used. Since the program and file have not changed on the Iseries I really don’t want to have to change them. I would rather determine the root cause and fix it. Thanks so much for your response. Any insight into this issue would be greatly appreciated.
    45 pointsBadges:
    report
  • TheRealRaven
    We can't tell what might have changed. The behavior is what the default has been since iSeries Access first came out years ago. If it gives different results, the transfer definition must have been changed.

    Simplest way to do such a transfer would seem to be a basic FTP rather than using the iAccess File Transfer feature. With iSeries Access using the 'ASCII text' transfer type, you'll probably need to go into data details and select each individual field. And for numeric fields, specify the DIGITS() function.

    Other than 'ASCII text', you might try one of the 'DOS Random' transfer types. We don't know what the target file should look like, so it's hard to say if those types will work. Those types differ from 'ASCII text' in that they won't won't apply any numeric edits to the fields, but they also don't add end-of-line characters. The member transfers as a straight block of bytes.
    36,025 pointsBadges:
    report
  • ToddN2000
    If you see a field using the DSPPFM that is packed, the only way to see the data is to show the hex value. How do you plan on doing this by transferring it to notepad? What are you actually looking to do using the client access transfer process? Where is the original file (local or remote) and where is it being transferred to and into what application?
    134,635 pointsBadges:
    report
  • philpl1jb

    The Client Access transfer stores the transfer rules in an .FDF file.

    You can edit that file and control how specific fields are sent. 

    54,090 pointsBadges:
    report
  • TheRealRaven
    If the file only has "Character and zoned numeric fields", packed values won't be a problem. That's at least one advantage, though it doesn't make clear how the file would be used.
    36,025 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: