View previous topic :: View next topic
|
Author |
Message |
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hello,
is it possible to do a display (or something like that) within an assembler transaction in CICS?
I am new on this system and only found the possibility to debug by using CEDF. But to my knowledge CEDF only stops on EXEC-CICS commands.
I know want to code some lines in the program to see if this section was entered or not. Best would be if i could print out some values of my Variables, but just nice to have ;)
Does anybody know how to do?
Best regards
Andi |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Two things that I found handy in working with assembler code running under CICS, a self written macro to do a display and a soft command (like a handle) to stop the CEDF.... |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Is it very complicated to write such a macro? Can you give me a hint how to do this??? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
One approach might be to use external TDQ to hold the messages you want to output. This is pretty much how I've seen high-level languages do it.
For a one-off, or the first instance, just EXEC CICS WRITEQ TD the data. If you need something reuseable, develop a macro to build the necessary message from variables and/or constants.
Garry. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Adding to Garry's reply, TDQ "CESE" is the destination where messages are routed to (under the covers) using the COBOL "DISPLAY" Verb.
I wouldn't recommend WTO's.
If your Assembler program is LE enabled, review the CEEMOUT Callable Service routine.
Regards, |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
springle your target assembler code with
EXEC CICS ASSIGN USERID
statements |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hey,
the solution using a TDQ sounds really good. Nobody of us ever heard about this.
Just played arround in CICS by typing in "CEMT I QUE" and got a list looking like that:
Code: |
CEMT I QUE
STATUS: RESULTS - OVERTYPE TO MODIFY
Que(ARLS) Tri( 00001 ) Int Ena Tra(ARLS) Des( )
Que(AUFS) Tri( 00001 ) Int Ena Tra(DRES) Des( )
Que(AUFT) Tri( 00001 ) Int Ena Tra(DREP) Des( )
Que(CADL) Ind(CPLI)
Que(CCSE) Ind(CPLI)
Que(CCSO) Ind(CPLI)
Que(CESE) Ext Ena Ope
Que(CESO) Ext Ena Ope
Que(CPLD) Ind(CPLI)
Que(CPLI) Ext Ena Ope
Que(CSCC) Ind(CPLI)
Que(CSCS) Ind(CPLI)
Que(CSDL) Ind(CPLI)
Que(CSML) Ind(CPLI)
Que(CSMT) Ind(CPLI)
Que(CSSL) Ind(CPLI)
Que(CSTL) Ind(CPLI)
Que(CXRF) Ext Ena Ope
APPLID=APPCCIC1
RESPONSE: NORMAL TIME: 16.09.04 DATE: 13.02.09
F 1 HELP 3 END 7 SBH 8 SFH 9 MSG 10 SB 11 SF
|
There we can see the Queue which Bill O'Boyle talked about.
But should we create a new queue for our debugging or can we use one of those queues?
And how can we look on the data in the queue after we wrote data into the queue?
Many many many thanks for your help!
Best regards Andi |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
You can use one of the existing "Ext" queues. If you do, your messages may be interspersed with messages from other tasks. How you view them depends on how the external dataset is resolved. If it's a SYSOUT dataset, you can access via SDSF. If a file, browse the file.
Since messages may be buffered, I've found that closing (and immediately re-opening) the TDQ cause buffered messages to be written.
Garry. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Use the CESE that COBOL displays go to....
Put a unique identifier followed by a timestamp followed by what ever data you want to display, it will make it easier to find..... |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hello again,
I found a cics transaktion to view the TS-QUEUES online (CEBR). Via CECI i tried to put a message into the QUEUE 'CESE'. This worked fine.
Now i started a test with my online assembler transaction with this code:
Code: |
TQMESSG DC CL5'HALLO'
EXEC CICS WRITEQ TS QUEUE('CESE') FROM(TQMESSG) LENGTH(5)
|
But this code causes a dump. Do I have to do something else before I put a message online to this TS-QUEUE???
Best regards
Andi |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
How does execution get to the EXEC CICS command? You can't execute
Code: |
TQMESSG DC CL5'HALLO' |
. You need to branch around it.
Garry. |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hey,
thanks for the fast answer. But i do not really understand what you mean with "you need to branch around it".
I just copied an existing EXEC CICS Statement from this program:
Code: |
EXEC CICS LINK PROGRAM('DCPAMA1') COMMAREA(DCNPTR) LENGTH(28)
|
This i changed into
Code: |
TQMESSG DC CL5'HALLO'
EXEC CICS WRITEQ TS QUEUE('CESE') FROM(TQMESSG) LENGTH(5) |
Would be nice if you can give me an example of what you mean.
Andi |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
For example...
Code: |
TQPROG DFHEIENT
TQPROG AMODE 31
TQPROG RMODE ANY
*
EXEC CICS WRITEQ TS QUEUE('CESE') FROM(TQMESSG) LENGTH(5)
EXEC CICS RETURN
*
TQMESSG DC CL5'HALLO'
END |
or
Code: |
TQPROG DFHEIENT
TQPROG AMODE 31
TQPROG RMODE ANY
*
B WRITEQ
TQMESSG DC CL5'HALLO'
*
WRITEQ EQU *
EXEC CICS WRITEQ TS QUEUE('CESE') FROM(TQMESSG) LENGTH(5)
EXEC CICS RETURN
*
END |
The literal 'HALLO' cannot be in the instruction path...
Garry. |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
WOW! Thank you very mutch, this was the solution!ยด
Now it works fine and i can see the messages in the transaction CEBR. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
You're welcome. I'm glad to have been of help and thanks for letting us know that it worked for you.
Garry. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
You can dynamically specify the LENGTH. based upon the length of the label.
EG -
Instead of LENGTH(5), specify LENGTH(=Y(L'TQMESSQ)) or LENGTH(=AL2(L'TQMESSG))
The difference between a "Y" directive and an "AL2" directive is that the "Y" directive is halfword aligned. Either one will generate the correct length.
IIRC, if you don't specify the LENGTH, the translator generates a "Y" directive anyway.
Regards, |
|
Back to top |
|
|
|