Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

PL/I & Assembler :: Send parameter for macro STIMERM from Cobol program

$
0
0
Author: Daniel Teolotitla
Subject: Send parameter for macro STIMERM from Cobol program
Posted: Tue Jul 05, 2016 9:23 pm (GMT 5.5)

Hi friends!

I doubt how I can use the macro STIMERM sending a hex numerical value from an invocation cobol, I have reviewed similar topics and saw a quite useful code in this forum and would like to reuse(thanks to the autor) , is as follows :

Cobol:

Code:
CALL QG6TIME1 USING DFHEIBLK DFHCOMMAREA WS-MSG


where WS-MSG is a hexadecimal value of 4 bytes value X'00000050'.

ASM:

Code:
*PROCESS RENT                                                           
*ASM XOPTS(NOEPILOG,SP)                                                 
DFHEISTG DSECT                         DYNAMIC-STG (R13)               
CSMTMSGL DS    H                          CSMT MESSAGE-LGTH             
CSMTMSGA DS    CL04                       CSMT MESSAGE-AREA             
QG6TIME1 DFHEIENT CODEREG=R3,DATAREG=R13,EIBREG=R11                     
         L     R7,8(,R1)                               ADDRESS 3RD-PARM
         NIHH  R7,32767                                CLEAR TOP-BIT   
         MVI   CSMTMSGA,C' '                           ENSURE SPACES   
         MVC   CSMTMSGA(4),0(R7)       INSERT 4-BYTE MSG FROM CALLER   
         LHI   R0,L'CSMTMSGA           PREPARE FOR 'STH'               
         STH   R0,CSMTMSGL             STORE AS HWORD                   
*                                                                       
         EXEC  CICS WRITEQ TS,         WRITE TO THE 'CSMT' TDQ,        X
               QUEUE ('QGTIMER'),      WHICH IS NORMALLY ROUTED TO     X
               FROM  (CSMTMSGA),       DD 'MSGUSR' IN THE GIVEN REGION X
               LENGTH(CSMTMSGL),                                       X
               NOHANDLE,                                               
         L     R15,EIBRESP             LOAD THE RESPONSE-CODE           
*                                                         
         DFHEIRET RCREG=R15            RETURN TO CALLER   
*                                                         
         DFHREGS ,                     CICS REGISTER-MACRO
QG6TIME1 AMODE 31 ,                                       
QG6TIME1 RMODE ANY ,                                       
*                                                         
*                                                         
         END QG6TIME1                                               


Works out well, I type 4-byte value that send him

On the other hand , independently, I have to invoke ASM routines using STIMERM macro from cobol through , which is more or less so:

Code:
         STIMERM SET,ID=ADDRESS,WAIT=YES,BINTVL=TIME       
ADDRESS  DS    F                                           
TIME     DS    X'00000050'                                 

And I generated a timely timer, but so static, since the value of TIME is constant

What i really want is to ' inject ' the macro STIMERM of the second routine in the first routine , and report the value of BINTVL from the STIMERM macro with the value sent from cobol program , I imagine something like this:

Code:
.....
.....previous code
.....previous code
         DFHEIRET RCREG=R15            RETURN TO CALLER   
*                                                         
         DFHREGS ,                     CICS REGISTER-MACRO
QG6TIME1 AMODE 31 ,                                       
QG6TIME1 RMODE ANY ,                                       
*                                                         
         STIMERM SET,ID=ADDRESS,WAIT=YES,BINTVL=CSMTMSGA
ADDRESS  DS    F                                           
CSMTMSGA  DS F

         END QG6TIME1                                     


Make the value of the dynamic variable BINTVL from the value stored in CSMTMSGA, but do not know how I can get it.

much appreciate your support and suggestions.
_________________
If you can imagine, you can program


Viewing all articles
Browse latest Browse all 9405

Trending Articles