How to write a Sequential file from the XCOM History file for reporting or other purposes.
Release: XCOM for z/OS 12.0
This is an example on how to get a Sequential file using the Xcom History file as input.
1. Fields description Input-Output: IMPORTANT: to make sure you have the latest refer to CBXGMAC(HSTDSECT) from your install files.
The fields listed will be extracted and reformatted to leave them in a readable format (not Binary or Decimal Packed ):
HSTDSECT HISTORY Output Description
field name length format length format
HSTLUSER (12) Char (12) Char LOCAL USER ID
HSTID (10) Char (10) Char IDENT FIELD
HSTLDSN (44) Char (44) Char LOCAL DATASET NAME
HSTSDATE (3) Pack (5) Char Start date YYDDD
HSTSTIME (4) Pack (7) Char Start time HHMMSSm
HSTEDATE (3) Pack (5) Char End date YYDDD
HSTETIME (4) Pack (7) Char End time HHMMSSm
HST#UNCB (4) Bin (10) Char NUMBER OF UNCOMPRESSED BYTES
HST#CMPB (4) Bin (10) Char NUMBER OF COMPRESSED BYTES
HST#RECS (4) Bin (10) Char NUMBER OF RECORDS TRANSMITTED
HSTTNAME (15) Char (15) Char TCP/IP NAME OR ADDRESS
2. JCL and parameters:
//REFORMAT EXEC PGM=ICEMAN
//STEPLIB DD DSN=SYS1.SORTLPA,DISP=SHR IBM DFSORT that contains ICEMAN
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR IBM DFSORT lib
//SYSOUT DD SYSOUT=*
//SYSIN DD *
//SORTIN DD DSN=*hlq*.XCOMHIST,DISP=SHR your Xcom History file
//SORTOUT DD DSN=your.sequ.file,DISP=(,KEEP), your Sequential file
// UNIT=SYSDA,SPACE=(TRK,(100,20)), adjust quantity as needed
// DCB=(LRECL=150,RECFM=FB,BLKSIZE=15000) adjust if add/remove output fields
The example job does not sort the records, just takes them in the order they are in the History file, reformats them and writes them to the output file. However it is possible to include other parameters to sort them in any sequence, to exclude records or other possibilities (please see Additional Information).
. The HSTLDSN field in the History file has a length greater than (44) Characters but this example takes only this length that is the maximum dataset name on the z/OS.
. The example takes all of the history records except the first one (internal use), but if necessary records can be filtered with additional parameters.
. For additional parameters please review the IBM DFSORT Application Programming Guide.