Looking for Lawson API Listing

Sort:
You are not authorized to post a reply.
Author
Messages
cschoonover
Basic Member
Posts: 5
Basic Member
    I am just getting back into Lawson Development and I used to have a API listing that had inputs/outputs along with a definition of what it does.  I no longer have it and would like to get my hands on one.  Does anyone have anything like that?

    I am working on a user exit for PA52 and all the fields on the screen are Alpha.  I need to convert them to numeric to compute. 

    Any help is appreciated.

    Thanks,
    Carrie Schoonover
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      I don't think we're supposed to share Infor/Lawson documents directly, per our licensing agreement, but I can tell you where to find it.

      From the InforXtreme site, go to "Search" (dropdown next to Home)>>Browse Documentation>>Lawson>>Technology>>System Foundation>>Lawson System Foundation>>{LSF version}. Once you get to the doc list, filter on "4GL" and select the "contains" filter. You should then see the "Lawson 4GL Application Program Interfaces" document.

      I hope this helps. Good Luck!
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      cschoonover
      Basic Member
      Posts: 5
      Basic Member
        Kelly,

        That is exactly what I was looking for!!  Knowledge Base is not what it was about 4 years ago when I was doing this work more often.  Thanks so much for the insight!!

        Carrie Schoonover
        jaherb
        Veteran Member
        Posts: 164
        Veteran Member
          This is not in the Lawson API manual, but I use a Lawson delivered routine called 2000-JUSTIFY-OBJECT for that function.
          cschoonover
          Basic Member
          Posts: 5
          Basic Member
            The output from 2000-Justify-Object is still Alpha.  I am looking for some way to convert an Alpha field to a numeric defined field so I can perform a compute statement.  Any ideas?
            jaherb
            Veteran Member
            Posts: 164
            Veteran Member
              Carrie....   Please see the information below....  the section highlighted below on  JSTWS-NUMERIC.

              There are several options you can use in this logic.  Let me know if you have any questions..

              Jim


                    ******************************************************************

                    *        STRING JUSTIFICATION ROUTINES CALLING PROGRAM           *

                    *                        (JUST70CP)                              *

                    *                                                                *

                    *    This is the calling program for routines contained within   *

                    *    JUST70PD which perform string justification with minor      *

                    *    error checking.                                             *

                    *                                                                *

                    *    The routine will left justify or right justify a string, or *

                    *    it will also format a string to a numeric format by adding  *

                    *    the appropriate number of leading zeroes.                   *

                    *                                                                *

                    *    INPUT FIELDS:                                               *

                    *    -------------                                               *

                    *      Required:                                                 *

                    *                                                                *

                    *        JSTWS-FUNCTION-FL.......88 level variable used to       *

                    *                                indicate type of justification  *

                    *                                to be performed.  Use the cobol *

                    *                                sentence format:                *

                    *                                    SET JSTWS-RIGHT TO TRUE     *

                    *                                                                *

                    *                                Valid functions:                *

                    *                                    JSTWS-LEFT      (Default)   *

                    *                                    JSTWS-RIGHT                 *

                    *                                    JSTWS-NUMERIC               *

                    *                                                                *

                    *        JSTWS-STR.............. String to be justified          *

                    *                                Maximum length of 50 characters *

                    *                                Required for Right and Numeric  *

                    *                                                                *

                    *        JSTWS-STR-LEN...........Length of field to be justified *

                    *                                                                *

                    *      Optional:                                                 *

                    *                                                                *

                    *        JSTWS-STR-OUT-LEN.......Length of string to be returned *

                    *                                if different from input string  *

                    *                                If actual length of text from   *

                    *                                input string is greater than    *

                    *                                this length, an error will be   *

                    *                                indicated by JSTWS-ERROR-FL     *

                    *                                                                *

                    *        JSTWS-ZERO-FILL-FL......Used to request that leading    *

                    *                                zeroes be added to the return   *

                    *                                string (done automatically when *

                    *                                JSTWS-NUMERIC function used)    *

                    *                                Use: SET JSTWS-ZERO-FILL TO TRUE*

                    *                                                                *

                    *                                If, for some reason, a numeric  *

                    *                                should be returned without      *

                    *                                leading zeroes, use:            *

                    *                                SET JSTWS-NO-ZERO-FILL TO TRUE  *

                    *                                                                *

                    *        JSTWS-REMOVE-0-FL.......Used to request that leading    *

                    *                                zeroes not be removed from the  *

                    *                                input string before justifying  *

                    *                                (this routine removes leading   *

                    *                                zeroes by default)              *

                    *                                Use: SET JSTWS-NO-REMOVE-0 TO   *

                    *                                     TRUE                       *

                    *                                                                *

                    *    OUTPUT FIELDS:                                              *

                    *    --------------                                              *

                    *        JSTWS-STR-OUT...........Justified string returned       *

                    *                                                                *

                    *        JSTWS-ERROR-FL..........88 level flag with fields       *

                    *                                JSTWS-ERROR                     *

                    *                                JSTWS-NO-ERROR                  *

                    *                                                                *

                    *                                                                *

                    *    Valid Function Flags:                                       *

                    *    JSTWS-LEFT (Default)                                        *

                    *                                                                *

                    *        This function will left justify a text string.  Leading *

                    *        zeroes are removed unless the JSTWS-NO-REMOVE-0 flag is *

                    *        set to TRUE.  (see the function "NUMERIC " for more     *

                    *        information on formatting numeric strings).             *

                    *                                                                *

                    *        Usage Example:                                          *

                    *            MOVE POWS-LOCATION          TO JSTWS-STR .          *

                    *            SET JSTWS-LEFT              TO TRUE.                *

                    *            PERFORM 2000-JUSTIFY-OBJECT.                        *

                    *            MOVE JSTWS-STR-OUT          TO POWS-LOCATION.       *

                    *                                                                *

                    *        Example Results:                                        *

                    *            In:  "     K500"    Out:  "K500     "               *

                    *            In:  "000123456"    Out:  "123456   "               *

                    *                                                                *

                    *    JSTWS-RIGHT                                                 *

                    *                                                                *

                    *        This function will right justify the input string to    *

                    *        the size specified in JSTWS-STR-LEN, unless an alternate*

                    *        value is indicated in JSTWS-STR-OUT-LEN.  For example,  *

                    *        if input string and length is "abc  " and 5, the output *

                    *        string would be "  abc".  If JSTWS-STR-OUT-LEN of 10    *

                    *        were specified in the same scenario, the output string  *

                    *        would be "       abc".                                  *

                    *                                                                *

                    *      Usage Example:                                            *

                    *            MOVE POWS-NAME              TO JSTWS-STR.           *

                    *            MOVE 10                     TO JSTWS-STR-LEN.       *

                    *            SET JSTWS-RIGHT             TO TRUE.                *

                    *            PERFORM 2000-JUSTIFY-OBJECT.                        *

                    *            MOVE JSTWS-STR-OUT          TO RQWS-NAME.           *

                    *                                                                *

                    *                                                                *

                    *    JSTWS-NUMERIC                                               *

                    *                                                                *

                    *        The purpose of this function is to format a string of   *

                    *        characters that represent numeric data.                 *

                    *                                                                *

                    *        Output will be right justified to the size passed in    *

                    *        JSTWS-STR-LEN unless a different size is requested by   *

                    *        filling JSTWS-STR-OUT-LEN.                              *

                    *                                                                *

                    *        Leading zeroes will be added to fill the string unless  *

                    *        JSTWS-NO-ZERO-FILL is set to TRUE (result would be a    *

                    *        right justified numeric string with leading spaces).    *

                    *                                                                *

                    *        An error is returned if any of the characters in the    *

                    *        string are non-numeric, if more than one decimal point  *

                    *        exists, or if imbedded spaces exist.                    *

                    *                                                                *

                    *      Usage Example:                                            *

                    *            MOVE HL7WS-COMPANY          TO JSTWS-STR.           *

                    *            MOVE 10                     TO JSTWS-STR-LEN.       *

                    *            MOVE 05                     TO JSTWS-STR-OUT-LEN.   *

                    *            SET JSTWS-NUMERIC           TO TRUE.                *

                    *            PERFORM 2000-JUSTIFY-OBJECT.                        *

                    *            MOVE JSTWS-STR-OUT          TO RQWS-COMPANY.        *

                    *                                                                *

                    *            Input string:  "       340"                         *

                    *            Output string: "00340"                              *

                    *                                                                *

                    ******************************************************************

              cschoonover
              Basic Member
              Posts: 5
              Basic Member
                That is what I have done but when I move JSTWS-STR-OUT to a working storage field I have defined as numeric, I get a compile error saying I can't move an Alpha field to a numberic field. The error is on that specific line of code. I did set JSTWS-NUMERIC to true but the output field is defined a Alpha.
                jaherb
                Veteran Member
                Posts: 164
                Veteran Member
                  Define the field as a PIC X field then redefine it as a numeric field. The JSTWS-NUMERIC will just zero fill the leading positions.
                  You are not authorized to post a reply.