Saturday, 21 September 2013

3.2 Job Variables files (Revisited)

3.2 Job Variables files (revisited):

Job variables can be assigned values in two types of files:

  1. Global variables file: Every PT job automatically reads the global variables file.

The user-defined path and filename of the global job variables file must put inside the  twbcfg.ini file as an entry

GlobalAttributeFile = ‘<userspath>/<usersGlobalJobVariablesName.’

  1. Local job variables file: We can create local job variables file specific to the job.
The local job variables file needs to be specified separately using thee -v option on the tbuild command.

Ex: tbuild -f weekly_update.tbr -v local.jobvars

On MVS local job variables file is specified through the DDNAME of ATTRFILE.


Using job variables requires two things:

  1. Setting up scripts that refer to local or global job variable values by specifying them using the form <attribute name>=@<job variable name>

Ex:

VARCHAR UserName=@Name
VARCHAR UserPassword=@Password
VARCHAR TdpId=@Tdp


  1. Entering variable value assignments in the global job variables file or the local job variables file.

        We can add the variable assignments
  • Separated by commas
  • Or one assignment per line with no comma's

Ex:

 MyTdpId         = 'defaultTdpId'
,MyUserName      = 'defaultUserName'
,MyPassword      = 'defaultPassword'


No comments:

Post a Comment