|
The initialization module is created using the EZACICR
macro. A minimum of two invocations of the macro are coded and assembled
and the assembly produces the module. An example follows: EZACICR TYPE=INITIAL
EZACICR TYPE=FINAL
This produces an initialization
module which creates one record of binary zeros. If you want to preload
the file with dummy records for frequently referenced domain names,
it resembles the following: EZACICR TYPE=INITIAL
EZACICR TYPE=RECORD,NAME=HOSTA
EZACICR TYPE=RECORD,NAME=HOSTB
EZACICR TYPE=RECORD,NAME=HOSTC
EZACICR TYPE=FINAL
where HOSTA, HOSTB, AND HOSTC
are the host names you want in the dummy records. The names can be
specified in any order.
The specifications for the EZACICR macro
are as follows: - Operand
- Meaning
- TYPE
- There are three acceptable values:
- Value
- Meaning
- INITIAL
- Indicates the beginning of the generation input. This value should
appear only once and should be the first entry in the input stream.
- RECORD
- Indicates a dummy record the user wants to generate. There can
be from 0 to 4096 dummy records generated and each of them must have
a unique name. Generating dummy records for frequently used host
names improves the performance of the cache file. A TYPE=INITIAL
must precede a TYPE=RECORD statement.
- FINAL
- Indicates the end of the generation input. This value should
appear only once and should be the last entry in the input stream.
A TYPE=INITIAL must precede a TYPE=FINAL.
- AVGREC
- The length of the average cache record. This value is specified
on the TYPE=INITIAL macro and has a default value of 500. Use the
default value until you have adequate statistics to determine a better
value. This parameter is the same as the first subparameter in the
RECORDSIZE parameter of the IDCAMS DEFINE statement. Accurate definition
of this parameter along with use of dummy records minimizes control
interval and control area splits in the cache file.
- NAME
- Specifies the host name for a dummy record. The name must be
from 1 to 255 bytes long. The NAME operand is required for TYPE=RECORD
entries.
The macro can be used in conjunction with
IDCAMS to define and load the file. The following example shows a
sample job to define and initialize a cache file:
Figure 1. Example
of defining and initializing a DNS cache file
//CACHEDEF JOB (accounting,information),programmer.name,
// MSGLEVEL=(1,1),MSGCLASS=A,CLASS=A
//*
//* z/OS Communications Server
//* SMP/E distribution name: EZACICFG
//*
//* Licensed Materials - Property of IBM
//* "Restricted Materials of IBM"
//* 5694-A01
//* Copyright IBM Corp. 2000,2008
//*
//* Status = CSV1R10
//*
//* Function: This job defines and then loads the VSAM
//* file used for the CICS TCP cache. The job stream
//* has the following steps:
//*
//* 1. Delete a cache file if one exists
//* 2. Define the VSAM cache file to VSAM
//* 3. Assemble the initialization program
//* 4. Link the initialization program
//* 5. Execute the initialization program to load the
//* VSAM cache file
//*
//* THIS STEP DELETES AN OLD COPY OF THE FILE
//* IF ONE IS THERE.
//*
//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE -
CICS.USER.CACHE -
PURGE -
ERASE
//*
//* THIS STEP DEFINES THE NEW FILE
//*
//DEFINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME(CICS.USER.CACHE) VOLUMES(CICVOL) -
CYL(1 1) -
RECORDSIZE(500 1000) FREESPACE(0 15) -
INDEXED ) -
DATA ( -
NAME(CICS.USER.CACHE.DATA) -
KEYS (255 0) ) -
INDEX ( -
NAME(CICS.USER.CACHE.INDEX) )
/*
//*
//* THIS STEP DEFINES THE FILE LOAD PROGRAM
//*
//ASM EXEC PGM=ASMA90,PARM='OBJECT,TERM',REGION=1024K
//SYSLIB DD DISP=SHR,DSNAME=SYS1.MACLIB
// DD DISP=SHR,DSNAME=TCPV34.SEZACMAC
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,1))
//SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSPUNCH DD DISP=SHR,DSNAME=NULLFILE
//SYSLIN DD DSNAME=&&OBJSET,DISP=(MOD,PASS),UNIT=SYSDA,
// SPACE=(400,(500,50)),
// DCB=(RECFM=FB,BLKSIZE=400,LRECL=80)
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EZACICR TYPE=INITIAL
EZACICR TYPE=RECORD,NAME=RALVM12
EZACICR TYPE=FINAL
/*
//LINK EXEC PGM=IEWL,PARM='LIST,MAP,XREF',
// REGION=512K,COND=(4,LT,ASM)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD SPACE=(CYL,(5,1)),DISP=(NEW,PASS),UNIT=SYSDA
//SYSLMOD DD DSNAME=&&LOADSET(GO),DISP=(MOD,PASS),UNIT=SYSDA,
// SPACE=(TRK,(1,1,1)),
// DCB=(DSORG=PO,RECFM=U,BLKSIZE=32760)
//SYSLIN DD DSNAME=&&OBJSET,DISP=(OLD,DELETE)
//*
//* THIS STEP EXECUTES THE FILE LOAD PROGRAM
//*
//LOAD EXEC PGM=*.LINK.SYSLMOD,
// COND=((4,LT,DEFINE),(4,LT,ASM),(4,LT,LINK))
//EZACICRF DD DSN=CICS.USER.CACHE,DISP=OLD
After the cache file has been created, it has the following
layout: - Field name
- Description
- Host name
- A 255-byte character field specifying the host name. This field
is the key to the file.
- Record type
- A 1-byte binary field specifying the record type. The value is
X'00000001'.
- Last refresh time
- An 8-byte packed field specifying the last refresh time. It is
expressed in seconds because 0000 hours on January 1, 1990 and is
derived by taking the ABSTIME value obtained from an EXEC CICS® ASKTIME and subtracting the
value for January 1, 1990.
- Offset to alias pointer list
- A halfword binary field specifying the offset in the record to
DNSALASA.
- Number of INET addresses
- A halfword binary field specifying the number of INET addresses
in DNSINETA.
- INET addresses
- One or more fullword binary fields specifying INET addresses returned
from GETHOSTBYNAME().
- Alias names
- An array of variable length character fields specifying the alias
names returned from the name server cache. These fields are delimited
by a byte of binary zeros. Each of these fields have a maximum length
of 255 bytes.
|