IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Scripting TSO TEST


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 33
Location: United States

PostPosted: Wed Apr 15, 2020 7:19 am
Reply with quote

I'm developing a simple REXX script queuing TSO TEST commands followed by
TEST <ALC module> LOAD

The queued commands are "AT +xxx" breakpoints (listpsw; GO)

I would like to add EXEC to a breakpoint to call a separate script to evaluate the psw data. I need to check the condition code and write depending on the CC value.

How do I pass the PSW data to the sub script?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed Apr 15, 2020 9:27 am
Reply with quote

I wouldn't bet you could run the TSO EXEC command at a TSO TEST breakpoint. If you can, you can trap LISTPSW output and extract the condition code from that.
Code:
PSW LOCATED AT 9C6108                                     
  XRXXXTIE   KEY  XMWP  AS CC  PROGMASK  EA BA  INSTR ADDR
  00000111    8   1101  00 00    0000     0  0   0002AFFA
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Apr 16, 2020 10:23 am
Reply with quote

I think this is one of the few instances where CLIST is better than Rexx.

I think in your CLIST, you can issue your TEST command and then subsequent CLIST statements can include your AT statements.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Apr 16, 2020 4:29 pm
Reply with quote

Well, by accident, I discovered you can issue an EX (EXEC) command in TSO TEST, though I cannot say if you can retrieve data from an OUTTRAP. I cannot think of any way you can distinguish between messages from TEST or trapped messages from your program.

Here is where Rexx might work better than CLIST. A Rexx EXEC could - in theory - run the RB chain, find "your" RB, though how it could reliably determine which RB is "your" RB, and retrieve the condition code from the PSW in "your" RB. Just a thought; one way to deduce if it found "your" RB is to look at the interrupt code in the RB. If it's the interrupt code is for the SVC instruction TEST uses to force the trap for AT, you've found "your" RB. I cannot guess if that would work. Well, good luck and let us know what you have found.
Back to top
View user's profile Send private message
zmoney

New User


Joined: 15 Jan 2021
Posts: 4
Location: PL

PostPosted: Sat Jan 16, 2021 4:07 am
Reply with quote

I had a similar challenge when I wanted to pass the absolute address of the current instruction to the TSO TEST LIST subcommand. I did not want to use "LIST +0 I" because I wanted the absolute address in the output as well. So, I had to parse the LISTPSW output to get the current address and then pass it to LIST. I solved it with nested CLISTs.

The JCL runs a TSO TEST script that executes a CLIST called STEP at each breakpoint.
Code:


 BROWSE    ZMONEY.JCL(TEST) - 01.92                 Line 0000000000 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
********************************* Top of Data **********************************
//ZMONEYT JOB (AO13ICC0),'TEST',                                               
//  CLASS=C,MSGCLASS=X,COND=(4,LT),                                             
//  MSGLEVEL=(1,1),REGION=0M,NOTIFY=ZMONEY,                                   
//  TIME=1440,LINES=(999999,WARNING),                                           
// USER=ZMONEY                                                                 
//**********************************************************************       
//STD1     OUTPUT CLASS=X                                                       
//**********************************************************************       
//STEP010  EXEC PGM=IKJEFT01,DYNAMNBR=20                                       
//SYSTSPRT DD SYSOUT=(,),OUTPUT=(*.STD1)                                       
//SYSTSIN  DD *                                                                 
TEST 'ZMONEY.PLI.LOAD(LAB)'                                                   
WHERE                                                                           
AT +40:+B0 (EX STEP)                                                           
AT +60:+B0 (EX STEP)                                                           
GO                                                                             
******************************** Bottom of Data ********************************


The STEP CLIST parses the LISTPSW output and executes a CLIST called LI, passing it the address in the PSW.
Code:


 BROWSE    ZMONEY.STEP.CLIST                        Line 0000000000 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
********************************* Top of Data **********************************
SET &SYSOUTTRAP = 3                                                             
LISTPSW                                                                         
WRITE &SYSOUTLINE1                                                             
WRITE &SYSOUTLINE2                                                             
WRITE &SYSOUTLINE3                                                             
WRITE                                                                           
SET &SYSOUTTRAP = 0                                                             
                                                                               
/* PARSE THE ADDRESS IN PSW AND PASS TO LI                                     
EX LI '&SUBSTR(50:58,&SYSOUTLINE3)' LIST                                       
WRITE                                                                           
                                                                               
LIST 0R:15R                                                                     
WRITE                                                                           
GO                                                                             
******************************** Bottom of Data ********************************


The LI CLIST passes the address to the TSO TEST LIST subcommand.
Code:

 BROWSE    ZMONEY.LI.CLIST                          Line 0000000000 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
********************************* Top of Data **********************************
PROC 1 ADDR                                                                     
  LIST &ADDR.. I                                                               
******************************** Bottom of Data ********************************


I get absolute addresses in the output.
Code:

 SDSF OUTPUT DISPLAY ZMONEYT  J0051142  DSID   102 LINE 0       COLUMNS 02- 81
MODE DATA     
 COMMAND INPUT ===>                                            SCROLL ===> PAGE
********************************* TOP OF DATA **********************************
READY                                                                           
TEST 'ZMONEY.PLI.LOAD(LAB)'                                                   
TEST                                                                           
WHERE                                                                           
 24A01EF0. LOCATED AT +0      IN LAB     .CEESTART UNDER TCB LOCATED AT 8A44C8.
TEST                                                                           
AT +40:+B0 (EX STEP)                                                           
IKJ57305I NO BREAKPOINTS ESTABLISHED FROM+ 04 OF RANGE BEGINNING +40 +         
IKJ57305I INVALID OP CODE                                                       
TEST                                                                           
AT +60:+B0 (EX STEP)                                                           
IKJ57305I NO BREAKPOINTS ESTABLISHED FROM+ 4A OF RANGE BEGINNING +60 +         
IKJ57305I INVALID OP CODE                                                       
TEST                                                                           
GO                                                                             
IKJ57024I AT +40                                                               
IKJ57652I PSW LOCATED AT 8A46E0                                                 
  XRXXXTIE   KEY  XMWP  AS CC  PROGMASK  EA BA  INSTR ADDR                     
  00000111    8   1101  00 00    0110     0  1   24A01E18                       
                                                                               
LIST 24A01E18. I                                                               
24A01E18.    BC      15,36(,R15)                                    00000000   
                                                                               
 0R  00022C4C   1R  00029928   2R  00029928   3R  24EF7968                     
 4R  24A01EE4   5R  00000000   6R  24EF8967   7R  00000001                     
 8R  00029808   9R  00000008  10R  00000000  11R  000510B0                     
12R  0002AC30  13R  000511C0  14R  A4EF809E  15R  24A01E18                     
                                                                               
IKJ57024I AT +4 FROM +60                                                       
IKJ57652I PSW LOCATED AT 8A46E0                                                 
  XRXXXTIE   KEY  XMWP  AS CC  PROGMASK  EA BA  INSTR ADDR                     
  00000111    8   1101  00 00    0110     0  1   24A01E3C                       
                                                                               
LIST 24A01E3C. I                                                               
24A01E3C.    STM     R14,R4,12(R13)                                 00000000   
                                                                               
 0R  00022C4C   1R  00029928   2R  00029928   3R  24EF7968                     
 4R  24A01EE4   5R  00000000   6R  24EF8967   7R  00000001                     
 8R  00029808   9R  00000008  10R  00000000  11R  000510B0                     
12R  0002AC30  13R  000511C0  14R  A4EF809E  15R  24A01E18                     
                                                                               
IKJ57024I AT +8 FROM +60                                                       
IKJ57652I PSW LOCATED AT 8A46E0                                                 
  XRXXXTIE   KEY  XMWP  AS CC  PROGMASK  EA BA  INSTR ADDR                     
  00000111    8   1101  00 00    0110     0  1   24A01E40                       
                                                                               
LIST 24A01E40. I                                                               
24A01E40.    L       R14,76(,R13)                                   00000000   
                                                                               
 0R  00022C4C   1R  00029928   2R  00029928   3R  24EF7968                     
 4R  24A01EE4   5R  00000000   6R  24EF8967   7R  00000001                     
 8R  00029808   9R  00000008  10R  00000000  11R  000510B0                     
12R  0002AC30  13R  000511C0  14R  A4EF809E  15R  24A01E18                     

...

                                                                               
IKJ57024I AT +46 FROM +60                                                       
IKJ57652I PSW LOCATED AT 8A46E0                                                 
  XRXXXTIE   KEY  XMWP  AS CC  PROGMASK  EA BA  INSTR ADDR                     
  00000111    8   1101  00 00    0110     0  1   24A01E7E                       
                                                                               
LIST 24A01E7E. I                                                               
24A01E7E.    BALR    R1,R14                                         00000000   
                                                                               
 0R  00000000   1R  A4EADEF6   2R  00029928   3R  24EF7968                     
 4R  24A01EE4   5R  00000000   6R  24EF8967   7R  00000001                     
 8R  00029808   9R  00000008  10R  00000000  11R  000510B0                     
12R  0002AC30  13R  000511C0  14R  A4EF809E  15R  00000000                     
                                                                               
IKJ57023I PROGRAM UNDER TEST HAS TERMINATED NORMALLY+                           
IKJ57023I BREAKPOINTS SET ARE STILL VALID                                       
TEST                                                                           
END                                                                             
******************************** BOTTOM OF DATA ********************************



This is the PL/I source of the load module.
Code:

 BROWSE    ZMONEY.PLI(LAB) - 01.05                  Line 0000000000 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
********************************* Top of Data **********************************
 HELLO: PROCEDURE OPTIONS (MAIN);                                       00010003
     DCL ABCDEFG PTR;                                                   00020005
     ABCDEFG = ADDR(ABCDEFG);                                           00021005
 END;                                                                   00030003
******************************** Bottom of Data ********************************


This is the JCL I used to compile/link it.
Code:

 BROWSE    U2D4705.JCL(PLITEST) - 01.47             Line 0000000000 Col 001 080
 Command ===>                                                  Scroll ===> PAGE
********************************* Top of Data **********************************
//ZMONEYP   JOB (AO13ICC0),'ZMONEYP',                                           
//  CLASS=C,MSGCLASS=X,                                                         
//  COND=(4,LT),                                                               
//  NOTIFY=ZMONEY,MSGLEVEL=(1,1),REGION=0M,                                     
//  TIME=1440,LINES=(999999,WARNING)                                           
//**********************************************************************       
//  SET MEM=LAB                            SOURCE NAME                         
//  SET PGM=LAB                            LOAD MODULE NAME                     
//  SET PLICOMP='SYS1.VAPLI.V3R5.SIBMZCMP' PLI COMPILER LOADLIB                 
//  SET DTLIB='EQAW.SEQAMOD'               DEBUG TOOL LOADLIB                   
//  SET LEHLQ='SYS1'                       LE HIGH LVL QUALIFIER               
//  SET UNITDEV=SYSDA                      UNIT FOR TEMP FILES                 
//**********************************************************************       
//COMPILE EXEC PGM=IBMZPLI,REGION=0M,                                           
// PARM=('+DD:OPTIONS')                                                         
//OPTIONS  DD *                                                                 
   MAP,OBJECT,LIST                                                             
/*                                                                             
//SYSUT1   DD SPACE=(CYL,(5,2),,CONTIG),DCB=BLKSIZE=1024,UNIT=&UNITDEV         
//SYSPRINT DD SYSOUT=*                                                         
//STEPLIB  DD DSN=&PLICOMP,DISP=SHR                                             
//         DD DSN=&LEHLQ..SCEERUN,DISP=SHR                                     
//SYSLIB   DD DISP=SHR,DSN=ZMONEY.PLINCL                                       
//SYSIN    DD DSN=ZMONEY.PLI(&MEM),DISP=SHR                                     
//SYSLIN   DD DSN=ZMONEY.PLI.OBJ(&MEM),DISP=SHR                                 
//**********************************************************************       
//LINK     EXEC PGM=HEWL,PARM='XREF,LET,LIST,CALL',REGION=2M                   
//SYSUT1   DD DSN=&&SYSUT1,SPACE=(1024,(120,120),,,ROUND),                     
//            UNIT=SYSDA,DCB=BUFNO=1                                           
//SYSPRINT DD SYSOUT=*                                                         
//SYSLIN   DD DSN=ZMONEY.PLI.OBJ(&MEM),DISP=(OLD,KEEP)                         
//SYSLIB   DD DSN=SYS1.SCEELKED,DISP=SHR                                       
//SYSLMOD  DD DSN=ZMONEY.PLI.LOAD(&MEM),DISP=SHR                               
//                                                                             
******************************** Bottom of Data ********************************
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Zunit Test case editor error Testing & Performance 4
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts REXX Test under Mask??? CLIST & REXX 3
No new posts Assembler test under mask question PL/I & Assembler 5
No new posts a copybook getting improper values in... COBOL Programming 7
Search our Forums:

Back to Top