### Example CONFIG BASIC Statement Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=analyzer-started-task-configuration-settings Provides an example of a CONFIG BASIC statement, as found in the predefined CAZCNFG0 member. This example demonstrates the configuration of basic settings like STCid, HLQ, UNIT, and CheckpointDSN, including comments explaining each parameter. ```JCL CONFIG BASIC // Basic settings: STCid=CAZ0 // . Application Performance Analyzer instance ID HLQ=CAZ0 // . DSN high level qualifier UNIT=SYSDA // . unit name for new data sets CheckpointDSN='.CHKP'; // . checkpoint file DSN // (appended to HLQ) ``` -------------------------------- ### JCL Setup for Application Performance Analyzer Batch Interface Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=commands-sample-jcl This JCL snippet configures the Application Performance Analyzer's Batch Interface to create a new measurement request. It specifies the program to execute, library for authorization, output for messages, and the input JCL statements defining the measurement job's parameters, including its name, activation status, sampling rate, duration, and a descriptive text. Ensure to replace `_hlq_` with your installation's high-level qualifier and `CAZ0` with your Application Performance Analyzer started task name if necessary. ```jcl //SAMPJOB1 JOB (job parameters) //* //CAZBATCH EXEC PGM=CAZBATCH,PARM='STCID=CAZ0' //STEPLIB DD DISP=SHR,DSN=hlq.SCAZAUTH //SYSPRINT DD SYSOUT=* //SYSIN DD * NEW JOBNAME=APPJOB01 ACTIVE=NO SAMPLES=5000 DURATION=30 DESCR='Sample request for APPJOB01' ; /* // ``` -------------------------------- ### Example MVS START Command for CICS/Db2 Measurement Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=commands-using-mvs-start-command-schedule-new-measurement This example demonstrates how to use the MVS START command to initiate a CICS/Db2 measurement. It specifies the SYSIN PDS member 'CAZNEWCI' and sets the STC and JOBN parameters for the measurement. This command utilizes the APARM parameter to pass these options to the CAZSTART EXEC. ```MVS Console S CAZ$NEW,APARM='MEMBER=CAZNEWCI STC=CAZ0 JOBN=CICS54A' ``` -------------------------------- ### Mount zFS File System - JCL Example Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=program-directory This JCL snippet demonstrates how to mount a zFS file system. It specifies the data set name, mount point, access mode, and type. Ensure OMVS and zFS are active on the driving system before execution. The recommended mount point is /usr/lpp/IBM/apa/v15r1. ```JCL MOUNT FILESYSTEM('**#dsn**') MOUNTPOINT('**/usr/lpp/IBM/apa/v15r1**') MODE(RDWR) /* can be MODE(READ) */ TYPE(ZFS) PARM('AGGRGROW') /* zFS, with extents */ ``` -------------------------------- ### Specify JVMTI agent with System ID (BPXBATCH) Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=j9vm-specify-jvmti-agent This example shows how to specify the system ID of the Application Performance Analyzer started task when using the -agentpath parameter in JCL with BPXBATCH. This is useful when multiple started tasks are operating on the system. ```jcl //STEP EXEC PGM=BPXBATCH, //PARM='sh java –agentpath:/usr/lpp/apa/v14r2/libCAZJTA14.so=CAZ1 prog’ ``` -------------------------------- ### Copy Sample Installation Jobs using IEBCOPY Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=program-directory This JCL job uses the IEBCOPY utility to copy sample installation jobs from a source data set to a target JCL library. It selects specific members to be copied, such as CAZWSMPE, CAZWRECV, CAZWALOC, and CAZWZFS. Ensure to update the placeholder values for input and output data set names and volume serials. ```JCL //STEP1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //IN DD DSN=IBM.HAD0F10.F4, // DISP=SHR, //* VOL=SER=**filevol**, // UNIT=SYSALLDA //OUT DD DSNAME=**jcl-library-name**, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(20,10,5)) //* VOL=SER=**dasdvol**, // UNIT=SYSALLDA //SYSUT3 DD UNIT=SYSALLDA,SPACE=(CYL,(1,1)) //SYSIN DD * COPY INDD=IN,OUTDD=OUT SELECT MEMBER=(CAZWSMPE,CAZWRECV,CAZWALOC,CAZWZFS) SELECT MEMBER=(CAZWISMK,CAZWDDEF,CAZWAPLY,CAZWACPT) /* ``` -------------------------------- ### Configure Load Libraries and Directory Paths Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=descriptions-new LIBS specifies additional load libraries (up to 10 data set names) to be searched. DIRS specifies HFS directory paths (up to 440 bytes) for searching relative path names. LIBS and DIRS are mutually exclusive. ```shell LIBS=(USER1.LOADLIB,TEST1.LOADLIB) DIRS=("/u/axx01 /u/axx01/cpp") ``` -------------------------------- ### Delete Prior Release - SMP/E JCL Example Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=program-directory This JCL provides an example of using SMP/E commands to delete a prior release of Application Performance Analyzer (e.g., HAD0E20) before installing a new version in the same Target Zone. It includes steps for receiving a dummy function, applying it, and accepting it, followed by UCLIN commands to delete the SYSMODs. This is crucial to prevent abends during the APPLY phase. ```JCL //SMPPTFIN DD * ++FUNCTION(DUMMY01). ++VER (Z038) DELETE(HAD0E20). //SMPCNTL DD * SET BDY(GLOBAL). RECEIVE S(DUMMY01). SET BDY(tzone). APPLY S(DUMMY01) REDO. SET BDY(dzone). ACCEPT S(DUMMY01) BYPASS(APPLYCHECK) REDO . SET BDY(TZONE). UCLIN. DEL SYSMOD(HAD0E20). DEL SYSMOD(DUMMY01). ENDUCL. SET BDY(DZONE). UCLIN. DEL SYSMOD(HAD0E20). DEL SYSMOD(DUMMY01). ENDUCL. /* ``` -------------------------------- ### SMP/E APPLY CHECK with Recommended Service Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=program-directory This snippet demonstrates how to perform an SMP/E APPLY CHECK to ensure all recommended and critical service is installed with the FMIDs. It requires receiving the latest HOLDDATA and uses specific operands like SOURCEID(RSU*) and FIXCAT(IBM.PRODUCTINSTALL-REQUIREDSERVICE). ```z/OS JCL APPLY S(fmid,fmid,...) CHECK FORFMID(fmid,fmid,...) SOURCEID(RSU*) FIXCAT(IBM.PRODUCTINSTALL-REQUIREDSERVICE) GROUPEXTEND . ``` -------------------------------- ### Specify 64-bit JVMTI agent in JCL (BPXBATCH) Source: https://www.ibm.com/docs/en/apafz/16.1.2/index_topic=j9vm-specify-jvmti-agent This JCL snippet demonstrates how to execute a Java program using BPXBATCH, specifying a preloaded 64-bit JVMTI agent. It assumes a default installation path and a single Application Performance Analyzer started task. ```jcl //STEP EXEC PGM=BPXBATCH, //PARM='sh java –agentpath:/usr/lpp/apa/v14r2/libCAZJTA14.so prog’ ```