POS Transaction Analyzer User and Installation Guide, SST Version 1.2

Appendix C 155
Mapping of User-Defined Fields with PTLF Fields
POS/TA provides user-defined fields which can be mapped to fields in the PTLF record.
Perform the following steps to map a user-defined field with PTLF record.
1. Set the USER-TOKENS parameter in the PTLFCONF file to YES.
2. Amend USRPTLFC file on the POSTA subvolume on the NonStop to populate the required PTLF record in
the user fields.
3. Stop the POS/TA environment using the STOPPTLF command.
4. Compile USRPTLFC using the RUN ZTCMPTLF command to generate new executables for PTLFCOLL and
PTLFRECV programs.
5. Verify the VPROC of the PTLFCOLL and PTLFRECV programs to see if the compilation was successful.
6. Start the POS/TA backend environment using the STRTPTLF command.
Sample USRPTLFC file
The sample USRPTLFC file gives the information on how to populate transaction Date/Time in UserField1 and
Card Number on UserField2 from the PTLF record.
#include <stdioh>
#include <stringh>
#include <stdlibh>
#include "ptlfh"
#include "usrptlfh"
/*
User may change this source statement to compile
with user's customized ptlf files, then bind this
proc into ptlfcoll (using ZTCMPTLF TACL routine).
*/
extern char ptlfFilename[36]; /*07Aug2008*/
/*above field ptlfFilename can be used to send as a custom data
so that report can be generated for each PTLF File*/
/* Each field is of 20 bytes, so please extract the custom fields
* from the PTLF record ptlfrec pointer and set up the desired
* user fields.
*/
void USER_FIELDS(void *ptr, char *fld1, char *fld2, char *fld3)
{
ptlf_cob_buf_def *ptlfrec = (ptlf_cob_buf_def *)ptr;
/* Set up the fld1, fld2 and fld3 here if required */
/***************************************************/
/* HP sample changes */
/***************************************************/
Appendix C