|
View previous topic :: View next topic
|
| Author |
Message |
Daniel Teolotitla
New User

Joined: 04 Jul 2016 Posts: 5 Location: Mexico
|
|
|
|
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. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| It is not at all clear what you are asking help with. If you need to know the COBOL format for CSMTMSGA, an Assembler DS F is PIC S9(09) COMP-5 in COBOL. If you are asking something, please restate your question. And if you are using CICS, note that in your question, too, as some Assembler macros CANNOT be invoked from a CICS program. I have not looked to see if STIMERM is one of those. |
|
| Back to top |
|
 |
Daniel Teolotitla
New User

Joined: 04 Jul 2016 Posts: 5 Location: Mexico
|
|
|
|
Hi!!
Thakns for the time!, the process is compiled with Cobol and CICS, i invoke a ASM routine with the CALL statement in CICS, that macro can be invoked from CICS
| Code: |
| CALL WK-QG6TIME1 USING DFHEIBLK DFHCOMMAREA WK-MESSAGE |
QG6TIME1 is a ASM routine
| Code: |
*PROCESS RENT
*ASM XOPTS(NOEPILOG,SP)
DFHEISTG DSECT DYNAMIC-STG (R13)
CSMTMSGL DS H CSMT MESSAGE-LGTH
CSMTMSGA DS F CSMT MESSAGE-AREA
QG6TIME1 DFHEIENT CODEREG=R3,DATAREG=R13,EIBREG=R11
L R7,8(,R1)
NIHH R7,32767
MVI CSMTMSGA,C' '
MVC CSMTMSGA(4),0(R7)
LHI R0,L'CSMTMSGA
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 ,
LABELTIM STIMERM SET,ID=ADDRESS,WAIT=YES,BINTVL=TIME
EXEC CICS RETURN
ADDRESS DS F
TIME DS X'00000050'
END
|
WK -MESSAGE field does come to the routine and is written in the TS , but the macro STIMERM no longer running, like end.
What i need to know is how I can make the macro run after the TS written?
Because my final idea is to use one of these parameters sent to the routine to be used in the macro
Thaks for your support!! |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Quote: |
| t the macro STIMERM no longer running, like end. |
How do you know this?
If you're running under CICS, why are you not using EXEC CICS POST instead of STIMERM? |
|
| Back to top |
|
 |
Daniel Teolotitla
New User

Joined: 04 Jul 2016 Posts: 5 Location: Mexico
|
|
|
|
I do a CEDF on the transaction that invokes CALL, I go in and out but ignores the timer STIMERM , so I imagine it must be something wrong with the code.
I don't use POST because the time I require is in microseconds
thanks for your support!! |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| CEDF stops on EXEC CICS commands, so I have no idea why you think the STIMER would not be invoked -- you CANNOT tell this from looking at CEDF. |
|
| Back to top |
|
 |
Daniel Teolotitla
New User

Joined: 04 Jul 2016 Posts: 5 Location: Mexico
|
|
|
|
Because when I run the transaction without catch, I see my displays to validate the time the routine is invoked and time in microseconds is the same, the macro is not running
The CEDF was only to see not fail at runtime |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
What are you expecting? From the Assembler Services Reference manual on STIMERM (emphasis added by me):
| Quote: |
| The time interval is a real-time interval, measured continuously. The task can continue (WAIT=NO) or suspend execution (WAIT=YES). If the task continues execution, it can pass control to an exit routine (EXIT parameter) when the time interval is complete. If you specify an exit routine, the task can optionally pass a parameter to the exit routine (PARM parameter). The task grants control to the optional asynchronous timer completion exit when the time interval expires. If the task did not specify either an asynchronous timer completion routine or WAIT=YES, the task receives no indication that the time interval has expired. |
|
|
| Back to top |
|
 |
Daniel Teolotitla
New User

Joined: 04 Jul 2016 Posts: 5 Location: Mexico
|
|
|
|
well, i dont expect a response, i expect the macro run and consume the time, i see not running because my start time is equal to my end time are displayed before and after the call in the main program
Thanks |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I'm getting very close to locking this topic as an unproductive waste of time. We're having to drag information out of you, once piece at a time -- when you should be explaining, start to finish, what you are wanting to do and why you think what you have tried isn't working.
| Quote: |
| my start time is equal to my end time are displayed before and after the call in the main program |
What start time?
What end time?
How are you getting the start and end times?
Why are you not showing us these values that you are getting?
Why are you not showing us the calling program code that displays these values?
Since you are telling STIMERM to delay one-half a second, depending upon what you're doing and how you're doing it, it is entirely possible that STIMERM is working correctly and your code is not displaying in fine enough detail to see the difference. We cannot tell this, however, since you haven't bothered to post the code. |
|
| Back to top |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
| Robert Sample wrote: |
| ... Since you are telling STIMERM to delay one-half a second, ... |
The requested wait time is actually 80/100th of a second. 50 hexadecimal = 80 decimal. Or is it 80/256 seconds?
I agree with Mr. Sample this thread is going nowhere. I also suspect this is a foolish thing to do. Isn't there an API in CICS to do this legally? I don't do CICS, so I can't be certain. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| In the manual, the description of STIMERM specifically says the low-order bit has a value of 0.01 seconds. In any case, the STIMERM macro could be working and the TS may not be showing enough detail. |
|
| Back to top |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
| Robert Sample wrote: |
| In the manual, the description of STIMERM specifically says the low-order bit has a value of 0.01 seconds. ... |
OK then. X'50' = FL1'80', so that's 80 * .01 seconds, or 0.80 seconds. That's not so very long; your message could flash by and disappear more quickly than you can register it. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
One of the things I don't understand is that you've spent a day and a half since posting that STIMERM didn't work, when you could have tested it MANY times yourself by now by changing your code to something like:
| Code: |
QG6TIME1 AMODE 31 ,
QG6TIME1 RMODE ANY ,
EXEC CICS ASKTIME ...
EXEC CICS FORMATTIME ...
LABELTIM STIMERM SET,ID=ADDRESS,WAIT=YES,BINTVL=TIME
EXEC CICS ASKTIME ...
EXEC CICS FORMATTIME ...
EXEC CICS RETURN
ADDRESS DS F
TIME DS F'30000' |
Compile and link edit / bind the program, then start CEDF on your terminal and step through your transaction until you get to the first EXEC CICS ASKTIME in your assembler routine. Hit the enter key three times rapidly. You will get one of four outcomes:
1. The second FORMATTIME executes immediately or close to it. You then know that STIMERM is not working and can open a PMR with IBM on it.
2. The second ASKTIME executes five minutes after the first FORMATTIME. You then know that STIMERM is working and you can move on to other issues.
3. You get a wait-related CICS ABEND somewhere before 5 minutes is up. You can then suspect that STIMERM is working but you don't have conclusive proof of it; adjust the time value to complete within the wait value CICS allows and retest.
4. You get a non-wait-related CICS ABEND somewhere before 5 minutes is up. You may suspect STIMERM is working if the ABEND was near the end of 5 minutes, but you cannot really know for sure without further testing.
As far as your original issue goes, WS-MSG most likely should be defined as PIC S9(09) COMP-5 in your COBOL program. And you don't make macros work -- either they produce results after you compile the assembler code, or you don't have a parameter value correctly specified (in which case you usually get an assembler error or you get some form of ABEND). |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|