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;