Batch activation

Electronic Service Agent™ can be activated in a batch environment. This approach is helpful for customers with many remote systems who would like to send programs from a central site for remote activation.

To use the batch environment method, the Electronic Service Agent™ product must be installed and the Electronic Service Agent Simplified Activation PTFs need to be available on each system and be installed or be available for installation.

For releases before V5R4:
  • Start of changeBefore using a program, the International License Agreement for Services Programs must be accepted. To accept the license agreement, perform one of the following steps:
    • On a command line, enter GO SERVICE. Select Display Service Agent license agreement. Read the agreement and press F6 (Accept the terms of this agreement) to accept.
    • On a command line, enter QSVCDRCTR/ACPTSALIC. Read the agreement and press F6 to accept.
    End of change
  • Electronic Service Agent commands are not the same as those for V5R4. See the Electronic Service Agent User Guide for V5R3 Web site for information about batch activation.
Table 1. Commands and descriptions
Command Command description
CHGCNTINF Changes the service contact information. This information is used by the WRKCNTINF command as the local service information.
CRTSRVCFG Creates the service configurations used to electronically report problems and service information to IBM®.
CHGSRVCFG Changes the service configurations used to electronically report problems and service information to IBM.
DLTSRVCFG Deletes the service configurations used to electronically report problems and service information to IBM.
VFYSRVCFG Verifies the service configurations used to electronically report problems and service information to IBM.
CHGSRVAGT Changes the operation of Electronic Service Agent.
CHGSRVAGTA Changes the settings for Electronic Service Agent.
DSPSRVAGT Displays several aspects of Electronic Service Agent.
ENDSRVAGT Ends the Electronic Service Agent subsystem jobs.
RTVSRVAGT Retrieves the valid days of the week used by the CHGSRVATGTA command, the AUTOPTF and AUTOTEST parameters.
STRSRVAGT Starts Electronic Service Agent. If the CHGSRVAGTA command is used before this command is used, Electronic Service Agent is activated using those settings. If the command was not used, Electronic Service Agent is activated using the defaults.

A sample CL program is provided.

Sample CL Program for batch activation

This sample program refers to the fictitious ABC Company. Any associated references to this fictitious company are for illustration purposes only.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
Start of change
/********************************************************************/
/* ELECTRONIC SERVICE AGENT SAMPLE BATCH ACTIVATION PROGRAM         */
/********************************************************************/
/*                                                                  */
/* THIS CODE IS PROVIDED AS A SAMPLE AND IS NOT INTENDED            */
/* TO BE SUPPORTED BY IBM. THIS IS SUPPLIED ON AN AS-IS             */
/* BASIS AND IT IS THE RESPONSIBILITY OF THE END USER TO ENSURE     */
/* THE ACCURACY OF THE PROGRAM IN THEIR ENVIRONMENT.                */
/*                                                                  */
/********************************************************************/
/*                                                                  */
/* See the Electronic Service Agent Information Center articles     */
/* for additional requirements, such as authorities and system      */
/* values.                                                          */
/*                                                                  */
/********************************************************************/
PGM
/********************************************************************/
/*                                                                  */
/* The following variables are used to retrieve the possible        */
/* days to be used as input to the CHGSRVAGTA AUTOPTF and AUTOTEST  */
/* parameters.                                                      */
/*                                                                  */
/********************************************************************/
DCL VAR(&DAY1) TYPE(*CHAR) LEN(4)
DCL VAR(&DAY2) TYPE(*CHAR) LEN(4)
DCL VAR(&DAY3) TYPE(*CHAR) LEN(4)
DCL VAR(&DAY) TYPE(*CHAR) LEN(4)
DCL VAR(&DAYS) TYPE(*CHAR) LEN(28) +
VALUE('*WED*THU*FRI*SAT*SUN*MON*TUE')
DCL VAR(&DAYPTR) TYPE(*DEC) LEN(1 0) VALUE(1)
/********************************************************************/
/*                                                                  */
/* Change the contact information.                                  */
/*                                                                  */
/********************************************************************/
QSYS/CHGCNTINF CMPNY('ABC Company') CONTACT('System +
               Administrator') TELNBR('123-456-7890') +
               MAILADDR('123 ABC Street' *SAME *SAME +
               ANYTOWN MN US 12345) LNGVER(2924) +
               EMAILADDR(SYSADMIN@ABCCOMPANY.COM) +
               MEDPTF(*AUTOMATIC)
/********************************************************************/
/*                                                                  */
/* Configure the ECS and Service Agent connections.                 */
/* NOTE: THIS SAMPLE ASSUMES A DIRECT CONNECTION FOR THE PRIMARY    */
/*       AND A MULTIHOP CONNECTION FOR THE BACKUP.                  */
/*                                                                  */
/********************************************************************/
QSYS/CRTSRVCFG ROLE(*PRIMARY) CNNTYPE(*DIRECT) +
               CNTRYID(US) STATE(MN)
/*                                                                  */
QSYS/CRTSRVCFG ROLE(*BACKUP) CNNTYPE(*MULTIHOP) +
               RMTSYS('10.11.12.13')
/********************************************************************/
/*                                                                  */
/* Retrieve the days of the week that can be used for CHGSRVAGTA.   */
/*                                                                  */
/* Choose the day that best fits the activity for this system.      */
/* Use the &DAYS variable. The first one is the first choice,       */
/* second one is the second choice, and so on.                      */
/********************************************************************/
QSYS/RTVSRVAGT DAY1(&DAY1) DAY2(&DAY2) DAY3(&DAY3)

DAYLOOP:
IF (&DAY1 *EQ (%SUBSTRING(&DAYS &DAYPTR 4))) THEN(DO)
   CHGVAR VAR(&DAY) VALUE(&DAY1)
GOTO DAYLOOP
ENDDO

IF (&DAY2 *EQ (%SUBSTRING(&DAYS &DAYPTR 4))) THEN(DO)
   CHGVAR VAR(&DAY) VALUE(&DAY2)
GOTO DAYLOOP
ENDDO

IF (&DAY3 *EQ (%SUBSTRING(&DAYS &DAYPTR 4))) THEN(DO)
   CHGVAR VAR(&DAY) VALUE(&DAY)
GOTO DAYLOOP
ENDDO

CHGVAR VAR(&DAYPTR) VALUE(&DAYPTR +4)
GOTO DAYLOOP

ENDDAYLOOP:
/********************************************************************/
/*                                                                  */
/* Configure Service Agent hardware problem reporting using the     */
/* day of the week that was determined above and the desired time.  */
/*                                                                  */
/* -- NOTE: Use this command only if you want to override the       */
/* CHGSRVAGTA defaults.                                             */
/*                                                                  */
/********************************************************************/
QSYS/CHGSRVAGTA ENABLE(*YES) AUTORPT(*YES) AUTOPTF(*YES +
                &DAY *YES) AUTOTEST(&DAY) SRVINF((*ALL))

/********************************************************************/
/*                                                                  */
/* Activate Service Agent. If commands CHGSRVAGTA was used ahead of */
/* this, Service Agent will activate using those settings.          */
/* If the command was not used, Service Agent will be activated     */
/* using the defaults.                                              */
/*                                                                  */
/********************************************************************/
SKIPIT: QSYS/STRSRVAGT TYPE(*ACTIVATE)

ENDPGM
End of change