× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ok I got it to work by doing this:

     Hoption(*nodebugio:*srcstmt) NOMAIN  thread(*serialize)

     DdecodeBase64     PR         32767    varying
     D inputString                32767    const

     DstringObject     S               O   class(*JAVA:'java.lang.String')
     DbyteObject       S               O   class(*JAVA:'java.lang.Byte')

     DnewByteArray     PR              O   extProc(*JAVA:'java.lang.Byte':
     D                                             *CONSTRUCTOR)
     D                                 O   class(*JAVA:'java.lang.String')
     D                                     CONST

     DnewString        PR              O
extproc(*JAVA:'java.lang.String':
     D                                     *CONSTRUCTOR)
     D                            32767a   const varying options(*varsize)

     Ddecode           PR              O   extproc(*JAVA:'com.twiek.Utils.-
     D                                     Base64':'decode')
     D                                     class(*JAVA:'java.lang.String')
     D                                     Static
     D                                 O   class(*JAVA:'java.lang.String')

     DgetBytes         PR         32767a
extproc(*JAVA:'java.lang.String':
     D                                     'getBytes') varying

     PdecodeBase64     B                   Export
     DdecodeBase64     PI         32767    varying
     D inputString                32767    const

     DoutputString     S                   like(decodeBase64)

      /free

       stringObject = newString(%trim(inputString));
       stringObject = decode(stringObject);
       outPutString = getBytes(stringObject);

       return outputString;
      /end-free
     P                 E

But, the string which I return, which is 32 bytes by the way, when I pass
it to QSYSETPT, It gives me an Invalid Token error. The token returned is
really funky looking. Any Idea what I'm doing wrong?

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.