Plex 2E

  • 1.  Long String processing (PLEX)

    Posted Jun 24, 2011 07:37 AM
    Hi there,

    I need to concatenate a lot of data into one string up to 4096 long (AS400/RPG4). This may sound easy but CONCAT only add up to 1023 and then doesn't add the rest of the information.
    I then tried Format message with works up to 2048 but then the application fails. Any suggestion will help.

    Thank you
    Kruger.


  • 2.  RE: Long String processing (PLEX)

    Posted Jun 24, 2011 09:16 AM
    Hi there,

    Why do you say the CONCAT only adds up to 1023?

    I just tried this with RPGIV generated with 6.1 and it works just fine.

    How do you know it is only populating 1023 characters? Are you looking at the field in debug? Debug will default to the first 1024 characters when displaying. To see the full 4096 characters, use EVAL FIELD:C 4096.

    Other than that, not sure why you are only seeing the first 1023 characters populated...

    Crispin.


  • 3.  RE: Long String processing (PLEX)

    Posted Jun 24, 2011 11:24 AM
    Hi Kruger,
    Like says Crispin, the key is to move to RPGIV variant. We are managing until 37 kb strings (and not only for concat operations). Being possible to mix both RPG400 & RPGIV, it is possible to migrate string management to the "newer".

    Jorge Ubeda


  • 4.  RE: Long String processing (PLEX)

    Posted Jun 24, 2011 12:05 PM
    Hi Jorge,

    He said he was already using RPGIV...

    Crispin.


  • 5.  RE: Long String processing (PLEX)

    Posted Jun 25, 2011 04:05 PM
    ok, Crispin. Sorry.
    Next monday will review some of our routines.


  • 6.  RE: Long String processing (PLEX)

    Posted Jun 26, 2011 10:25 PM
    Thank you for your reply.

    On the question on how I know what the content of the string is:
    I have to evaluate each Character in the string to ensure that no unwanted characters were added via the data. I have the total length of the string as I added each field's data and use Substring to get character by character and do some check but also log the detail. There it only starts printing the characters from 1023.

    I am busy going through the code and making changes to the tracking, to identify the problem function.

    Thank you again.
    Kruger. (I will let you know...)


  • 7.  RE: Long String processing (PLEX)
    Best Answer

    Posted Jun 27, 2011 07:36 AM
    Hi all,

    I must appoligize. I found the problem in the function I wrapped the substring in. All seems to be working now fine.

    Thank you for the help.
    Kruger


  • 8.  Re: Long String processing (PLEX)

    Posted Aug 16, 2017 11:37 AM

    Jorge and Crispin,

     

    What suggestions do you have to handle large XML files with PLEX on iSeries? I am working on development of an XML Pattern to generate Excel XML and the files will be very large. 

     

    Knowing there are limitations with formatting via Messages, what alternatives do you know of? Maybe using Labels or Source Code objects? 

     

    I am defining my functions as RPGIV, in case this matters.

     

    Any tip is greatly appreciated,

     

    Lucio

    PLEX WORLD



  • 9.  Re: Long String processing (PLEX)

    Posted Aug 17, 2017 03:26 AM

    Hi Lucio!

    we use APIs for string and IFS file management (Scott Klement APIs for IFS). ILE world evolved long and fast, far from Plex use of it.

    Jorge



  • 10.  Re: Long String processing (PLEX)

    Posted Aug 17, 2017 08:50 AM

    Hi Lucio,

     

    We incorporated CGIDEV2 into Plex to help with creating XML files.  See this article by Jon Paris & Susan Gantner describing the technique.  IBM Systems Magazine - CGIDEV2 and XML   I created source code objects to wrapper the procedure calls.  Then I created an abstract function that put each of the procedure calls into a different subroutine.  This makes it easy for any developer to inherit from that function and utilize the functionality.

     

    Dean Eshleman,

    Everence Services