Fame Glow Feed

Premium fame highlights with sleek curation.

news

New TSI Calls - Documentation for BMC AMI DevX Code Pipeline 22.01

Writer Daniel Cobb

There are three new TSI calls available to use in custom Deploy code:

  • DPLYPRTI, LIST – List Deploy Part Instance Log Entries
  • DPLYPRTI, ADD – Add Deploy Part Instance Log Entry
  • DPLYPRTI, CLEANUP – Clean Up Deploy Part Instance Log Entry

DPLYPRTI LIST

This call can be made at some point during the Promotion process (usually in the Set Post Exit) to list all the Target runtime members and libraries that have been deployed to by the Task being promoted. It details all the Deploy Part Instances that have been deployed for that Task from an Application Stream Level in the  Code Pipeline  lifecycle.

Table-DPLYPRTI LIST Input Fields describes the input and Table-DPLYPRTI LIST Output Fields describes the output fields.

DPLYPRTI LIST Input Fields

Input Field

Description

TASKIDX,LENGTH=12

Task ID in hex format

APPLID,LENGTH=8

The Application Level in the Code Pipeline  Lifecycle where Deploys are initiated

SUBAPPL,LENGTH=8

STRMNAME,LENGTH=8

LCLVL,LENGTH=4


DPLYPRTI LIST Output Fields

Output Field

Description

DPRTIID,FORMAT=INTEGER,TYPE=KEY

Deploy Part Instance ID

DPARTID,FORMAT=INTEGER

Deploy Part ID

DPRTINAM,LENGTH=128

Deploy Part Instance name

DPTYPE,LENGTH=8

Deploy Type

PARTTYPE,LENGTH=8

Part Type

PARTCLAS,LENGTH=4

Part Class

PARTNAME,LENGTH=64

Part Name

TASKID,LENGTH=6,FORMAT=BINARY

Task ID

CMPNID,LENGTH=6,FORMAT=BINARY

Component ID

CMPVID,FORMAT=SMALLINT

Component VID

DREQID,FORMAT=INTEGER

Deploy Request ID

PKGID,FORMAT=SMALLINT

Deploy Package ID

ITEMID,FORMAT=SMALLINT

Deploy Item ID

SYSTNAME,LENGTH=8

Deploy System Name

DPENV,LENGTH=8

Deploy Environment

SUBENV,LENGTH=4

Deploy Sub-Environment

STORTYPE,LENGTH=4

Storage Type

STORNAME,LENGTH=100

Storage Name

STORUSGE,LENGTH=1

Storage Usage

CTSRVRNM,LENGTH=8

CT Server Name

ACTIDTTM,LENGTH=26

Deploy Log Entry Timestamp

DPLYPRTI ADD

This new  Code Pipeline call will add a Deploy Part Instance Log Entry. It is not required when the Deploy Implementation Type has been set to C (the Copy to the Target is performed internally by Code Pipeline ), because the Deploy Logging happens automatically. It is only required when the ITEM, GET call is being used to copy to the Target. In this situation, Deploy Logging must be requested manually using this new DPLYPRTI, ADD call.

The following table describes the input fields.

DPLYPRTI ADD Input Fields

Input Field

Description

DPRTINAM,LENGTH=128

Deploy Part Instance Name (optional), defaults to Deploy Part Name if not provided.

DIDREQID,FORMAT=INTEGER,VNAME=DREQID

Deploy Request ID

DIPKGID,FORMAT=SMALLINT,VNAME=PKGID

Deploy Package ID

DIITEMID,FORMAT=SMALLINT,VNAME=ITEMID

Deploy Item ID

DISYSTNM,LENGTH=8,VNAME=SYSTNAME

Deploy System Name

DISTORTP,LENGTH=4,VNAME=STORTYPE

Deploy Part Instance Storage Type, Name and Usage. If these fields aren’t supplied on input, they are looked up from the Deploy Logical Storage Group configuration definition.

DISTORNM,LENGTH=100,VNAME=STORNAME

DISTORUS,LENGTH=1,VNAME=STORUSGE

DPLYPRTI CLEANUP

This new  Code Pipeline  call can be used when deleting members from the Target runtime libraries. It tracks this event by updating the current Deploy Part Instance Log Entry to become inactive.

The following table describes the input fields.

DPLYPRTI CLEANUP Input Fields

Input Field

Description

DPRTIID,FORMAT=INTEGER

Deploy Part Instance ID

Sample Code

The code in the following figure shows an example Clean Up stub in the Set Post Exit. In the standard  Code Pipeline  delivered sample it could reside in WZUSETX.

Sample Code – Cleanup_Deploy

Cleanup_deploy:
/* ------------------------------------------------------------------ */
/* This function is called on a promote to cleanup the datasets */
/* deployed at the previous level */
/* ------------------------------------------------------------------ */ call Open_Set "ISPEXEC TBSKIP ASTABLE" tbrc = rc Do While tbrc = 0 DZTABLE = "DZTABLE" taskidx=c2x(taskid) STRMNAME = sxstrm LCLVL = oplvl retc = WZZTSI("DPLYPRTI","LIST") say "DPLYPRTI LIST rc = "retc Address ISPEXEC If retc = 0 then do "TBTOP" DZTABLE Do Until skiprc > 0 "TBSKIP" DZTABLE skiprc = rc If rc = 0 then do say DPRTIID DPRTINAM STORTYPE STORNAME STORUSGE CTSRVRNM delpds = storname delmem = dprtinam Call Delete_Member retcu = WZZTSI("DPLYPRTI","CLEANUP") say "DPLYPRTI CLEANUP rc = "retcu End End "TBEND" DZTABLE End "ISPEXEC TBSKIP ASTABLE" tbrc = rc End