Convert to PCASCII with EBCIDIC numeric representation for numeric values. - IBM AS400

This is a discussion on Convert to PCASCII with EBCIDIC numeric representation for numeric values. - IBM AS400 ; Hi all, I am looking to convert Physical file data into a IFS file in PCASCII. I would like to see the numeric values in the ASCII file show the EBDEDIC representation of the numeric value. Ex: 101- shows has ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Convert to PCASCII with EBCIDIC numeric representation for numeric values.

  1. Convert to PCASCII with EBCIDIC numeric representation for numeric values.

    Hi all,
    I am looking to convert Physical file data into a IFS file in PCASCII.
    I would like to see the numeric values in the ASCII file show the EBDEDIC
    representation of the numeric value.
    Ex: 101- shows has 10J
    I had done this before in V5R1 using the CPYTOSTMF command.
    I can't seem to get this working know, (V5R3). Not sure if I remember the
    correct way to do this.

    Any help would be greatly appreciated.

    Sincerely,

    Jody



  2. Re: Convert to PCASCII with EBCIDIC numeric representation for numeric values.


    You probably forgot but use the operational navigator or Client Access
    and print the PCASCII file to a database file and I think you'll get
    the data you need. It's worth a try and easy to do.


  3. Re: Convert to PCASCII with EBCIDIC numeric representation for numeric values.

    Jody, see below.

    news.gt.ca wrote:
    > Hi all,
    > I am looking to convert Physical file data into a IFS file in PCASCII.

    =>There are a number of ways you could do this, the simplist is via the
    QSH or PASE shells using the /QSYS.LIB/XXX.LIB/YYY.FILE/ZZZ.MBR as the
    source where XXX, YYY and ZZZ are the names of the library, file and
    member from which to copy. To get the conversion to take place
    correctly, the target file must be created with the correct CCSID prior
    to performing the copy. To create the target file with the correct
    CCSID, I either use an API or copy the file from a system, such as your
    PC/Workstation, via Navigator with translation turned on or use FTP.
    If I remember correctly, the default CCSID for IFS is 819 which is the
    default, ASCII CCSID used by AIX systems. When you FTP from an AIX
    system, you will get this default unless someone has changed the
    default for your system.

    The next simplest would be to use the CPYTOSTMF command as you did with
    V5R1. See below for more information.

    > I would like to see the numeric values in the ASCII file show the EBDEDIC
    > representation of the numeric value.
    > Ex: 101- shows has 10J

    ==> I'm not sure that I understand your example.

    > I had done this before in V5R1 using the CPYTOSTMF command.
    > I can't seem to get this working know, (V5R3). Not sure if I remember the
    > correct way to do this.

    ==> To get the conversion to take place correctly, you have to use the
    correct CCSIDs and/or code pages. The command after using either F9 to
    display all parameters looks like this

    From file member or save file __________________________________


    To stream file . . . . . . . . . _________________________________


    Stream file option . . . . . . . *NONE *NONE, *ADD, *REPLACE
    Data conversion options . . . . *AUTO *AUTO, *TBL, *NONE
    Database file CCSID . . . . . . *FILE 1-65533, *FILE
    Stream file code page . . . . . *STMF 1-32767, *STMF,
    *PCASCII...
    Conversion table . . . . . . . . _________

    End of line characters . . . . . *CRLF *CRLF, *LF, *CR, *LFCR...

    Leave the 'Data conversion options' set to *AUTO and the 'Database file
    CCSID' set to *FILE. Set the 'Stream file code page' to *PCASCII or
    set it to the code page you want to use for the target file.
    Typically, you would use WIN1252 or, perhaps, WIN1252 for windows
    files; but use the *PCASCII first to

    >
    > Any help would be greatly appreciated.
    >
    > Sincerely,
    >
    > Jody



+ Reply to Thread