Exporting a sequential file from the XCOM History file for reporting
search cancel

Exporting a sequential file from the XCOM History file for reporting

book

Article ID: 9358

calendar_today

Updated On:

Products

XCOM Data Transport XCOM Data Transport - z/OS

Issue/Introduction

How to write a Sequential file from the XCOM History file for reporting or other purposes.

 



Environment

Release: XCOM for z/OS 12.0
Component: xcmvs

Resolution

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 *
SORT FIELDS=(1,1,CH,A)
OPTION COPY,SKIPREC=1
INREC FIELDS=(2:29,12,15:99,10,26:122,44,
71:69,3,PD,M0,77:72,4,PD,M0,85:76,3,PD,M0,91:79,4,PD,M0,
99:221,4,BI,M0,110:225,4,BI,M0,121:229,4,BI,M0,132:997,15)
END
//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

3. Comments:
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).

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.