• CPYFRMSTMF with codepage 819

    From jdcs@arcor.de@21:1/5 to All on Sat Apr 20 03:35:14 2019
    I have to process a PC file in IFS with codepage 819 that uses hexcode 09 as separator when I display it with F10. When I do a CPYFRMSTMF to a database file, the separator byte is replaced by several (3 or 4) blanks (hexcode 40). Thus I'm losing the
    information about where the separators should be. I tried to cpy the file in IFS changing the codepage to 1252 but only had the same result afterwards. Would be great if anybody had an idea.

    Thanks a lot.

    Thomas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr.UgoGagliardelli@21:1/5 to All on Sun Apr 21 19:39:37 2019
    Il 20.04.2019 12.35, jdcs@arcor.de ha scritto:
    I have to process a PC file in IFS with codepage 819 that uses hexcode 09 as separator when I display it with F10. When I do a CPYFRMSTMF to a database file, the separator byte is replaced by several (3 or 4) blanks (hexcode 40). Thus I'm losing the
    information about where the separators should be. I tried to cpy the file in IFS changing the codepage to 1252 but only had the same result afterwards. Would be great if anybody had an idea.

    Use TABEXPN(*NO) command parameter to avoid that tab separators expands
    to blanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jon@systemideveloper.com@21:1/5 to jd...@arcor.de on Sun Apr 21 10:36:54 2019
    On Saturday, April 20, 2019 at 6:35:16 AM UTC-4, jd...@arcor.de wrote:
    I have to process a PC file in IFS with codepage 819 that uses hexcode 09 as separator when I display it with F10. When I do a CPYFRMSTMF to a database file, the separator byte is replaced by several (3 or 4) blanks (hexcode 40). Thus I'm losing the
    information about where the separators should be. I tried to copy the file in IFS changing the codepage to 1252 but only had the same result afterwards. Would be great if anybody had an idea.

    I would suggest that you take a look at using Open Access for the purpose. I wrote an article describing a basic CSV handler here: http://ibmsystemsmag.com/ibmi/developer/rpg/input_handlers/ and made the handelr more genric an added features here: http:/
    /ibmsystemsmag.com/ibmi/developer/rpg/flexible_input_handlers/

    The code for both is available for download and the modification for you to use it with this file should be trivial. All you should need to do is to modify the call to CSV_open to spcify your x'09' separator.

    Once you have recompiled the handler just add the HANDLER keyword and pams to the definition of the input file for the program that reads the file that you plan to output with CPYFRMSTMF. Then forget all about the vagaries of CPYFRMSTMF and enjoy life!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdcs@arcor.de@21:1/5 to All on Sun Apr 21 12:37:19 2019
    Thanks a lot for these great links. I will certainly take a closer look at these features.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jdcs@arcor.de@21:1/5 to All on Sun Apr 21 12:38:22 2019
    didn't know that this option actually existed (shame on me). And it worked. Thanks a lot!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)