Tuesday, August 27, 2019

Index.

Please note that this is my old site, the new site is https://ibmrestapi.blogspot.com

I have just realized that labels and the search function only work on the posts and not the pages so this is an index to get around that.

  • Challenges:
      • Now to do the REST of the rest as GET is done.
    • Resolutions:
    • Coding REST APIs:
    • REST APIs:

    Monday, August 26, 2019

    QtmhWrStout

    The solution for the challenge listed bellow was not to use QtmhWrStout but to use the YAJL  yajl_writeStdout routine as in Scott Klement's article and not the open source provided for STOCKQTY REST.

    Also EXTPGM should have been EXTPROC
    ----------------------------------------------------------------------------------------------------------------

    I can't seem to get this to work using fully/totally free RPG so resorted to RPG free IV:

    Here is the code

    Message ID . . . . . . :   MCH3401       Severity . . . . . . . :   40       
    Message type . . . . . :   Diagnostic                                        
    Date sent  . . . . . . :   22/08/19      Time sent  . . . . . . :   12:52:38 
                                                                                 
    Message . . . . :   Cannot resolve to object QtmhWrStou. Type and Subtype    
      X'0201' Authority X'0000'.                                                 
    Cause . . . . . :   Either a system pointer or a data pointer can not be     
      resolved.                                                                  
        For a system pointer, it can not be resolved to object QtmhWrStou, type  
      and subtype X'0201', authorization X'0000', because either the named object
      was not in any context referred to or the correct object was located but the
      user profile did not have the required authority.                          
        The object types for some common type or subtype codes follow:           
        -- 0190-Access group, 0201-Program, 0401-Library,                        
        -- 0701-Journal receiver, 0801-User profile, 0901-Journal,               
        -- 0B90-Data space, 0C01-Directory, 0C90-Data space index,               

    005200    DCL-PR   QtmhWrStout     EXTPGM('QtmhWrStout');              
    ======>                                   aaaaaaaaaaaaa                
    *RNF0646 10 a      005200  Library or object name exceeds 10 characters.
    005300             DTAVAR          VARCHAR(200000) CONST;              
    005400             DTAVARLEN       INT(10) CONST;                      
    005500             ERRORCODE       VARCHAR(8000);                      
    005600    END-PR;    

                                

    JSON

    Please see this blog for the solution to my challenge bellow.
    ------------------------------------------------------------------------------------------------------------------------------

    I would appreciate input as I can't get rid of the first two lines and the third has the { right at the end.
    Here is the code.


    When I execute the URL I do not get a JSON return but this:


    As can be seen next, the rest of the GET does the same