"getTradeWeather" JavaScript source in the Sample Trader Application
search cancel

"getTradeWeather" JavaScript source in the Sample Trader Application

book

Article ID: 260725

calendar_today

Updated On:

Products

HB.js

Issue/Introduction

A sample CICS program, COBOL TRADERPL, has a statement to call an external API, getTradeWeather.

Where I can find "getTradeWeather" JavaScript source in the Sample Trader Application ?

 GET-WEATHER SECTION.                                        
                                                             
    MOVE 'hbscript' TO TEMP1.                                
    EXEC CICS PUT CONTAINER('_REPOSITORY') CHANNEL('HBJS')   
                  FROM( TEMP1 )                              
                  FLENGTH(8)                                 
                  END-EXEC.                                  
                                                             
    MOVE 'getTraderWeather' TO TEMP1.                        
    EXEC CICS PUT CONTAINER('_SERVICE')                      
                  CHANNEL( 'HBJS' )                          
                  FROM( TEMP1 )                              
                  FLENGTH(16)                                
                END-EXEC.                                

Environment

Release : 8.0

Resolution

”getTradeWeather" JavaScript sources is attached to the KD.

It also calls another API "t007" in the script .   "t007" JavaScript sources is also attached to the KD.

 * Create the BMS Map copybooks, in and out
 */
var t007Factory = require('t007', 'hbscript');
var t007in         = new t007Factory.t007i({initialize : true});
var t007out     = new t007Factory.t007o({initialize : true, initCharacter : '\x00'});

Attachments

1677635428493__t007.hbx get_app
1677466502980__getTraderWeather.hbx get_app