LU 6.2 API Application Programmer's Reference Guide (30294-90008)

172 AppendixB
Sample Programs
Pascal Program
$uslinit$
$standard_level 'HP3000'; tables on; code_offsets on; xref on$
$global 'SPL'$
$PAGE$
program credit(input,output);
{ Date written: August, 1987.}
{ Date compiled: August, 1987.}
const
ACCEPT_CODE = '3';
DATA_COMPLETE = 1;
FULL_RECORD = 80;
LENGTH_REMOTE_TPNAME = 4;
NO_SW = false;
YES_SW = true;
ON = 2;
CONVSYNCLEVEL = 0;
SEND = 4;
SOC_SEC_ERROR_CD = 1;
SYSTEM_ERROR_CD = 3;
TRANSLATE_TO_ASCII = 1;
TRANSLATE_TO_EBCDIC = 2;
TRANSLENGTH = 30;
YES = ['y', 'Y'];
AllocateErrMsg = text ['Allocate Error '];
CTranslateErrMsg = text ['CTranslate Error '];
DeallocateErrMsg = text ['Deallocate Error '];
EndedErrMsg = text ['TP Ended Error '];
RcvAndWaitErrMsg = text ['RcvAndWait Error '];
SendDataErrMsg = text ['Send Data Error '];
StartedErrMsg = text ['TP Started Error '];
WhatReceivedErrMsg = text ['What Received Error '];
type
shortint = -32768..32767;
pac4type = packed array [1..4] of char;
nametype = packed array [1..10] of char;
errmsgtype = packed array [1..20] of char;
ssnumtype = packed array [1..9] of char;
balancetype = packed array [1..6] of char;
MasterDataType = record
case shortint of
0: (SocSecMaster : ssnumtype;
LastNameMaster : nametype;
FirstNameMaster : nametype;
MINameMaster : char;
CoCodeMaster1 : char;
BalanceMaster1 : balancetype;
CoCodeMaster2 : char;