Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Variant Substitution - z/OS

This example demonstrates the use of variant substitution.

When Universal Connector is using pre-defined SAP jobs as template jobs (rather than Universal Connector job definition files), it may be necessary or desirable to replace the variants specified in the template job with variants more appropriate for the current job run. In this case, Universal Connector's target_variant option can be used to accomplish the variant substitution.


//USPVARSB  JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID                     
//*****************************************************************
//* Description
//* -----------
//* This sample demonstrates the use of USAP's target_variant 
//* option to perform variant substitution when using pre-defined 
//* SAP jobs as templates. 
//*
//* NOTE: This job assumes (and requires) that a job already 
//* exists on an the SAP system with:
//* Job Name: VARSBST1
//* Job ID:   12345678
//*
//* This sample will:
//* 1. Modify variants SBT1 and SBT2 with values required for this 
//*    job run.
//* 2. Submit a new job to the SAP system using a pre-existing SAP 
//*    job as a template. 
//* 3. Perform variant substitution on the newly created job.  The 
//*    newly created job will now use variants SBT1 and SBT2 for 
//*    steps 1 and 2 respectively (regardless of what variants 
//*    were defined in the template job).
//* 4. Wait for the job to complete.
//* 5. Return the job log.
//* 6. Return the spool list.
//* 
//         JCLLIB ORDER=#SHLQ.UNV.SUNVSAMP                           
//*
//*****************************************************************
//* Modify variant 'SBT1' for ABAP program RSUSR002
//*****************************************************************
//STEP1    EXEC USPPRC                                               
//VARDEF   DD  *                                                     
 /* Variant Header statement. */
 VARIANT_NAME   = "SBT1"
    REPORT      = "RSUSR002";
 /* User */
 SELNAME        = "USER"
    KIND        = "S"
    SIGN        = "I" 
    OPTION      = "CP" 
    LOW         = "STONEBRANCH"
    HIGH        = "";
//SYSIN    DD  *                                                     
   -dest         CF5 
   -client       800 
   -userid       sapuid 
   -pwd          sappwd      
   -modify       VARDEF
/* 
//*****************************************************************
//* Modify variant 'SBT2' for ABAP program RSUSR002
//*****************************************************************
//STEP2    EXEC USPPRC                                               
//VARDEF   DD  *                                                     
 /* Variant Header statement. */
 VARIANT_NAME   = "SBT2"
    REPORT      = "RSUSR002";
 /* User */
 SELNAME        = "USER"
    KIND        = "S"
    SIGN        = "I" 
    OPTION      = "CP" 
    LOW         = "STONEBRANCH1"
    HIGH        = "";
//SYSIN    DD  *                                                     
   -dest         CF5 
   -client       800 
   -userid       sapuid 
   -pwd          sappwd      
   -modify       VARDEF
/*
//*****************************************************************
//* Run SAP job using a pre-defined SAP job as a template and 
//* perform variant substitution.
//*
//* NOTE: This job assumes (and requires) that a job already 
//* exists on an the SAP system with:
//* Job Name: VARSBST1
//* Job ID:   12345678
//*
//* The pre-defined job must have ABAP program RSUSR002 defined in 
//* step one and step two.
//*****************************************************************
//STEP3    EXEC USPPRC                                               
//SYSIN    DD  *                                                     
   -dest         CF5 
   -client       800 
   -userid       sapuid 
   -pwd          sappwd      
   -run          
   -jobname      VARSBST1
   -jobid        12345678
   -target_variant 1,SBT1;2,SBT2
/*                    

SYSIN Options

SYSIN options used in this example are:

Command Options

Description

-dest

Named set of connection parameters (destination) 'CF5'. These connection parameters are used for communications with the SAP system. The default file for destination parameters is #HLQ.UNV.USPRFC00.

-client

SAP client number that Universal Connector will communicate with.

-userid

Remote user ID with which to execute the command.

-pwd

Password for the user ID.

-sub

Specification that Universal Connector will issue the SUBMIT command.

-start

Specification that Universal Connector will instruct the SAP system to start the submitted job.

-targetserver

Target server for the SAP job to run on.

-wait

Specification that Universal Connector will monitor the started job until it completes.

-joblog

Specification that Universal Connector will return the SAP log for the started job.

-spoollist

Specification that Universal Connector will return any spool lists created by the started job.

Components

Universal Connector for z/OS

  • No labels