Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Using Standard STCK and STCKF and Enhanced STCK, STCKE, and STCKF Support


You can change the date and time returned by your program's Assembler store clock (STCK), store clock extended (STCKE), and store clock fast (STCKF) instructions under Xchange CICS region support as well as the ISPF and batch interfaces.

There are a number of methods of enabling Xchange STCK. STCKE, and STCKF support:

  • standard STCK support introduced in Release 3.0
  • Enhanced STCK Support introduced with Release 3.1
  • standard STCKF support
  • Enhanced STCKE and STCKF support

Unless you have previously set up your programs to use standard STCK or STCKF support, We recommend using the version described in either Enhanced-STCK-Support, Enhanced-STCKE-Support, or Enhanced-STCKF-Support.

Standard STCK and STCKF Support

This Xchange function is enabled on a program-by-program basis by replacing STCK and STCKF instructions with a STCK or STCKF instream macro that leverages Xchange's SVC 11 support. To enable standard STCK or STCKF Support, perform the following steps:

  1. Edit your program's JCL to add a SYSIN DD statement pointing to the STCK or STCKF macro in the Xchange SLXGDATA library.
    An example of modified JCL for ISPF and batch programs is shown in the following figure. Replace CPWR with the high-level qualifier chosen for your site.
    Example JCL Changes for ISPF and Batch

    //HLASM EXEC PGM=ASMA90, etc.
    //STEPLIB DD DISP=SHR,DSN=SYS2.HLASSEM.R2.SASMMOD1
    //* THIS PLACES XCHANGE'S INSTREAM STCK MACRO
    //* IN FRONT OF YOUR PROGRAM SOURCE
    //SYSIN   DD DISP=SHR,DSN=CPWR.MLXGnnn.SLXGDATA(STCK)
    //        DD DISP=SHR,DSN=CPWR.MLXGnnn.SLXGDATA(STCKF)
    //        DD DISP=SHR,DSN=PROGRAM.TEST.SOURCE(&MEM)

    The following figure shows an example of modified JCL for a CICS program. Replace CPWR with the high-level qualifier chosen for your site.
    Example JCL Changes for CICS

    //TRN EXEC PGM=DFHEAP1$,PARM='SP'
    //STEPLIB  DD DSN=&INDEX..LOADLIB,DISP=SHR
    //SYSPRINT DD SYSOUT=*
    //* THIS PLACES XCHANGE'S INSTREAM STCK MACRO
    //* IN FRONT OF YOUR PROGRAM SOURCE
    //SYSIN   DD DISP=SHR,DSN=CPWR.MLXGnnn.SLXGDATA(STCK)
    //        DD DISP=SHR,DSN=CPWR.MLXGnnn.SLXGDATA(STCKF)
    //        DD DISP=SHR,DSN=PROGRAM.TEST.SOURCE(&MEM)
  2. Reassemble your program.


Tip

Before running a program that uses the Xchange STCK or STCKF instream macro, make sure the Xchange subsystem has been started at least once since the last IPL.

With this support enabled, the STCK and STCKF operation codes in your program will return whatever date and time you specify with Xchange.

Enhanced STCK Support

The Xchange Enhanced STCK Support is performed via an Xchange user SVC. See Enabling-Xchange-SVC for information on SVC installation. The user SVC instruction is zapped into each module that contains a STCK instruction on which you want to perform date/time simulation. Use the following steps to find and replace STCK instructions in modules.

  1. Unless you already know the specific modules that must be zapped, use a search tool to scan the load library containing modules that might have STCK instructions. Use the search string X'B205'.

    Tip

    File-AID and ISPF 3.14 can be used to perform this function.

  2. Edit and submit the following JCL to produce a DUMPT of the module to be zapped. Replace YOUR.LOAD.LIBRARY with the name of the load library containing the module. Replace XXXXXXXX with the name of the module.
    STCK Support DUMPT JCL

    //* INSERT JOBCARD HERE
    //ZAP EXEC PGM=AMASPZAP
    //SYSPRINT DD SYSOUT=*
    //SYSLIB   DD DISP=SHR,DSN=YOUR.LOAD.LIBRARY
    //SYSIN    DD *
           DUMPT XXXXXXXX ALL
  3. Browse the DUMPT output and search for X'B205's. Because the X'B205's are in a readable format, using a FIND 'B205' ALL command will locate the instructions.
  4. Determine the CSECT name and OFFSET for each X'B205'.
  5. Ensure each X'B205' is part of a valid IBM instruction — not storage constants.
  6. Copy the members to another data set.

    Tip

    This zap should not be applied to any production data sets.

  7. Edit and submit the JCL shown in the following figure to zap the module. Replace YOUR.LOAD.LIBRARY with the name of the load library containing the module. Replace mmmmmmmm with the module name to be zapped. Replace cccccccc with the CSECT name from the DUMPT report.Each X'B205' that is to be replaced will need a set of VER and REP cards in which you have replaced oooo with the offset found in the DUMPT report. Replace xx with the hex representation of the Xchange user SVC number. For example, user SVC 201 = 0AC9.
    STCK Support Zap JCL

    //* INSERT JOBCARD HERE
    //****************************************************
    //*** APPLY ZAP TO COPIED LOAD MODULE              ***
    //****************************************************
    //ZAP EXEC PGM=AMASPZAP,PARM=IGNIDRFULL
    //SYSPRINT DD SYSOUT=*
    //SYSLIB   DD DISP=SHR,DSN=YOUR.LOAD.LIBRARY
    //SYSIN    DD *
    NAME mmmmmmmm cccccccc
    VER  oooo     B205
    REP  oooo     0Axx

Your application program has now been properly zapped and is ready for Xchange testing with Enhanced STCK Support.

Enhanced STCKE Support

The Xchange Enhanced STCKE Support is performed via an Xchange user SVC. See Enabling-Xchange-SVC for information on SVC installation. The user SVC instruction can be zapped into each module that contains a STCKE instruction on which you want to perform date/time simulation. Use the following steps to find and replace STCKE instructions in modules.

  1. Unless you already know the specific modules that must be zapped, use a search tool to scan the load library containing modules that might have STCKE instructions. Use the search string X'B278'.

    Tip

    File-AID and ISPF 3.14 can be used to perform this function.

  2. Edit and submit the JCL in STCK Support DUMPT JCL figure to produce a DUMPT of the module to be zapped. Replace YOUR.LOAD.LIBRARY with the name of the load library containing the module. Replace XXXXXXXX with the name of the module.
  3. Browse the DUMPT output and search for X'B278's. Because the X'B278's are in a readable format, using a FIND 'B278' ALL command will locate the instructions.
  4. Determine the CSECT name and OFFSET for each X'B278'.
  5. Ensure each X'B278' is part of a valid IBM instruction — not storage constants.
  6. Copy the members to another data set.

    Tip

    This zap should not be applied to any production data sets.

  7. Edit and submit the JCL shown in the following figure to zap the module. Replace YOUR.LOAD.LIBRARY with the name of the load library containing the module. Replace mmmmmmmm with the module name to be zapped. Replace cccccccc with the CSECT name from the DUMPT report.Each X'B278' that is to be replaced will need a set of VER and REP cards in which you have replaced oooo with the offset found in the DUMPT report. Replace xx with the hex representation of the Xchange user SVC number. For example, user SVC 201 = 0AC9.
    STCKE Support JCL

    //* INSERT JOBCARD HERE
    //****************************************************
    //*** APPLY ZAP TO COPIED LOAD MODULE              ***
    //****************************************************
    //ZAP EXEC PGM=AMASPZAP,PARM=IGNIDRFULL
    //SYSPRINT DD SYSOUT=*
    //SYSLIB   DD DISP=SHR,DSN=YOUR.LOAD.LIBRARY
    //SYSIN    DD *
    NAME mmmmmmmm cccccccc
    VER  oooo     B278
    REP  oooo     0Axx
  8. Alternatively, for those application programs for which source exists, edit your program's JCL to add a SYSIN DD statement pointing to the STCKE macro in the Xchange SLXGDATA library. An example of modified JCL for ISPF and batch programs is shown in the following figure. Replace CPWR with the high-level qualifier chosen for your site.
    Example JCL Changes for ISPF and Batch

    //HLASM EXEC PGM=ASMA90, etc.
    //STEPLIB DD DISP=SHR,DSN=SYS2.HLASSEM.R2.SASMMOD1
    //* THIS PLACES XCHANGE'S INSTREAM STCKE MACRO
    //* IN FRONT OF YOUR PROGRAM SOURCE
    //SYSIN DD DISP=SHR,DSN=CPWR.MLXGnnn.SLXGDATA(STCKE)
    // DD DISP=SHR,DSN=PROGRAM.TEST.SOURCE(&MEM)

    The following figure shows an example of modified JCL for a CICS program. Replace CPWR with the high-level qualifier chosen for your site.
    Example JCL Changes for CICS

    //TRN EXEC PGM=DFHEAP1$,PARM='SP'
    //STEPLIB DD DSN=&INDEX..LOADLIB,DISP=SHR
    //SYSPRINT DD SYSOUT=*
    //* THIS PLACES XCHANGE'S INSTREAM STCKE MACRO
    //* IN FRONT OF YOUR PROGRAM SOURCE
    //SYSIN DD DISP=SHR,DSN=CPWR.MLXGnnn.SLXGDATA(STCKE)
    // DD DISP=SHR,DSN=PROGRAM.TEST.SOURCE(&MEM)
  9. Reassemble your program.

Your application program has now been properly modified and is ready for Xchange testing with Enhanced STCKE Support.

Enhanced STCKF Support

The Xchange Enhanced STCKF Support is performed via an Xchange user SVC. See Enabling-Xchange-SVC for information on SVC installation. The user SVC instruction is zapped into each module that contains a STCKF instruction on which you want to perform date/time simulation. Use the following steps to find and replace STCKF instructions in modules.

  1. Unless you already know the specific modules that must be zapped, use a search tool to scan the load library containing modules that might have STCKF instructions. Use the search string x'B27C'.

    Tip

    File-AID and ISPF 3.14 can be used to perform this function.

  2. Edit and submit the following JCL to produce a DUMPT of the module to be zapped. Replace YOUR.LOAD.LIBRARY with the name of the load library containing the module. Replace XXXXXXXX with the name of the module.
    STCKF Support DUMPT JCL

    //* INSERT JOBCARD HERE
    //ZAP EXEC PGM=AMASPZAP
    //SYSPRINT DD SYSOUT=*
    //SYSLIB DD DISP=SHR,DSN=YOUR.LOAD.LIBRARY
    //SYSIN DD *
                DUMPT XXXXXXXX ALL
  3. Browse the DUMPT output and search for x'B27C's. Because the x'B27C's are in a readable format, using a FIND 'B27C' ALL command will locate the instructions.
  4. Determine the CSECT name and OFFSET for each x'B27C'.
  5. Ensure each x'B27C' is part of a valid IBM instruction — not storage constants.
  6. Copy the member(s) to another data set.

    Tip

    This zap should not be applied to any production data sets.

  7. Edit and submit the JCL shown in STCKF Support Zap JCL to zap the module. Replace YOUR.LOAD.LIBRARY with the name of the load library containing the module. Replace mmmmmmmm with the module name to be zapped. Replace cccccccc with the CSECT name from the DUMPT report. Each x'B27C' that is to be replaced will need a set of VER and REP cards in which you have replaced oooo with the offset found in the DUMPT report. Replace xx with the hex representation of the Xchange user SVC number. For example, user SVC 201 = 0AC9.
    STCKF Support Zap JCL

    //* INSERT JOBCARD HERE
    //****************************************************
    //*** APPLY ZAP TO COPIED LOAD MODULE              ***
    //****************************************************
    //ZAP EXEC PGM=AMASPZAP,PARM=IGNIDRFULL
    //SYSPRINT DD SYSOUT=*
    //SYSLIB   DD DISP=SHR,DSN=YOUR.LOAD.LIBRARY
    //SYSIN    DD *
    NAME mmmmmmmm cccccccc
    VER  oooo     B27C
    REP  oooo     0Axx

Your application program has now been properly zapped and is ready for Xchange testing with Enhanced STCKF Support.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*