You are on page 1of 25

T24 Technical Training

APPLICATION
PROGRAMMING
INTERFACES
Application Program Interfaces Page 1 of 25
T24 Technical Training
APPLICATION PROGRAM INTERFACES
1.1 Introduction
This chapter describes the available options for developers who wish to enhance
the operation of the current GLOBUS system, where there are insufficient options
provided by the Standard GLOBUS utilities. Within specific applications the
system allows universe subroutines or Uni!erse commands in some cases" to
be defined, which will then be invo#ed when runnin$ the applications. This
provides a powerful tool to allow customisation of the GLOBUS to meet re$ional
or customer specific re%uirements.
1.2 APPLICATION CUSTOMISATION
1.2.1 Introduction
This section is concerned with the options available in customisin$ the operation
and content of GLOBUS applications.
1.2.2 VERSION APPLICATION - USER DEFINED SUBROUTINES
The VERSION application allows user defined subroutines to be specified in the
followin$ fields&
'(UT.)*W.+O)T*)T
!(L,-(T,O)..T)
',)/UT..OUT,)*
(UT0..OUT,)*
1.2.2.1 AUT.NEW.CONTENT (Fi!d "".1#
This field would normally be used to automatically enter a value into a field
specified in the associated (UTO1.2,*L-.)O. The automatic contents are only
used if the e3istin$ content of the field matches that defined in the associated
(UT.OL-.+O)T*)T. This field may also contain a sub4routine used to perform
conditional defaultin$ that cannot be defined in !ersion, or defaultin$ from related
files.
Application Program Interfaces Page 2 of 25
T24 Technical Training
The followin$ steps must be followed&
(UTO1.2,*L-.)O The name of the field that has to be automatically defaulted.
(UT.)*W.+O)T*)T @user-deined su!routine
U$r-d%ind $u&routin must be defined in /G1.2,L* as a type S application.
The field (//L.2O..SUB. contains the applications allowed to use the
subroutine.
*3ample&
The followin$ e3ample demonstrates a routine, which will automatically assi$n
the industry code and industry name in the file T.).S0(.*.1(ST*..
Figure 1.1 PGM.FILE For V.INDUSTRY.NAME
Figure 1.2 VERSION Automati !e"au#ti$g !e"i$itio$
Application Program Interfaces Page 3 of 25
T24 Technical Training
To default the ,)-UST.5.+O-* and ,)-UST.5.)(1* field usin$ the routine
!.,)-UST.5.)(1*.
Program %
0001: SUBROUTINE V.INUSTR!.N"#E
0002: $ S%&ro%'ine 'o (efa%l' 'he )al%e of in(%*'r+ co(e an( in(%*'r+ na,e in
0003: $ 'he a--lica'ion TRN.S."RE.#"STER
0004: $
0005: /INSERT I01O##ON
0002: /INSERT I0E3U"TE
0004: /INSERT I05.INUSTR!
0006: /INSERT I05.TRN.S."RE.#"STER
0007: $
0010: TE#P 8 5IE9:I.NE;<=>=<2?
0011: 1"99 BR:@INUSTR!@:5#:EB.IN.ES1RIPTION<TE#P<IN.N"#E?
0012: R.NE;:TRS#.INUSTR!.1OE? 8 TE#P
0013: R.NE;:TRS#.INUSTR!.N"#E? 8 IN.N"#E
0014: RETURN
0015: EN
1.2.2.2 VALIDATION.RTN (Fi!d '(.1#
This field, to$ether with !(L,-(T,O).2L-, allows definition of subroutines to be
e3ecuted when validatin$ the contents of fields within an application. ( routine
defined here would normally be used to perform specific validation or to default
the contents of field accordin$ to local re%uirements.
!(L,-(T,O).2L- The name of the field which has to be validated.
!(L,-(T,O)..T) user-deined su!routine
This subroutine is invo#ed immediately after the call to ,)633 as defined in the T
parameters for the application, and before any validation in the section
+0*+7.2,*L-S is e3ecuted. (lso at +ross4!alidation time, before the
+.OSS.!(L,-(T,O) section of the application is e3ecuted.
.outines defined here have the standard system variables available for chec#in$.
The followin$ variables should be used when performin$ chec#s8defaults&
COMI +ontains the contents of specified !(L,-(T,O).2L-.
COMI.ENRI This should contain the enrichment for the contents of +O1,.
"ISPLA# +ontains the formatted version of +O1, for display purposes.
ETE$T +ontains any error messa$e $enerated from the subroutine. This
field should be populated when an error is found.
MESSAGE This variable can be used to determine whether the system is
performin$ field level chec#s or cross validation. (t cross4validation
time it will contain the value 9!(L:; on4line it will be null.
Application Program Interfaces Page 4 of 25
T24 Technical Training
*3ample &
0001: $S%&ro%'ine 'o checA Bhe'her 'he 'ra(ing %ni' i* a ,%l'i-le
0002: $ of 12
0003: $
0004: SUBROUTINE V.TR"E.UNIT.V"9
0005: $
0002: /INSERT I01O##ON
0004: /INSERT I0E3U"TE
0006: /INSERT I05.TRN.S."RE.#"STER
0007: /INSERT I05.TRN.S..TR"NS"1TION
0010: $
0011: 1"99 BR
:CTRN.S."RE.#"STERD:5#:TRS#.TR"INE.UNITS<R.NE;:TRST.S."RE.I?<TU?
0012: I5 #O :1O#I< TU? NE 0 T.EN
0013: ETEFT 8 @In)ali( ,%l'i-le of TR"INE UNITS@
0014: 1"99 STORE.EN.ERROR
0015: RETURN
0012: EN
0014: RETURN
0016: $
0017: EN
,n the version the followin$ are specified &
Figure 1.& Ver'io$ (Va#i!atio$ Routi$e
1.2.2." AUT).ROUTINE (Fi!d '*.1#
The subroutine may be e3ecuted at the authori<ation sta$e of transaction
processin$, as the final sta$e before updatin$ authori<ed files. 1ultiple routines
may be defined by e3pandin$ the multi4values. .outines called at this sta$e may
be used to update local files. )o chec#in$ or override processin$ should be
performed at this sta$e as the system cannot process error conditions at this
point.
(UT0..OUT,)* user-deined su!routine
The user4defined subroutine used at this sta$e provide updates to local files.
Application Program Interfaces Page 5 of 25
T24 Technical Training
E%&'()e *
0001: $S%&ro%'ine 'o %-(a'e 'he TRN.S."RE..O9INE a' a%'horiGa'ion *'age
0002: $
0003: SUBROUTINE V.UP"TE.S."RE..O9INE
0004: $
0005: /INSERT I01O##ON
0002: /INSERT I0E3U"TE
0004: /INSERT I05.TRN.S."RE..O9INE
0006: /INSERT I05.TRN.S..TR"NS"1TION
0007: $
0010: EOSUB INITI"9ISE
0011: EOSUB PRO1ESS
0012: RETURN
0013: $
0014: INITI"9ISE:
0015: 5N.TRN.S."RE..O9INE 8 @5.TRN.S."RE..O9INE@
0012: 1"99 OP5:5N.TRN.S."RE..O9INE<5.TRN.S."RE..O9INE?
0014: H.I 8 ==
0016: R.RE1 8 ==
0017: RETURN
0020: $
0021: PRO1ESS:
0022: 1UST.I 8 R.NE;:TRST.1USTO#ER.I?
0023: S.".I 8 R.NE;:TRST.S."RE.I?
0024: H.I 8 S.".I :=I=:1UST.I
0025: 1"99 5.RE":@5.TRN.S."RE..O9INE@<H.I<R.RE1<5.TRN.S."RE..O9INE<ER
?
0022: I5 R.NE;:TRST.TR"NS"1TION.T!PE? E3 =PUR1."SE= T.EN
0024: I5 R.RE1 E3 == T.EN
0026: R.RE1JTRS..1USTO#ER.IK 8 R.NE;:TRST.1USTO#ER.I?
0027: R.RE1JTRS..S."RE.IK 8 R.NE;:TRST.S."RE.I?
0030: R.RE1JTRS..1URR.POSITIONK 8 R.NE;:TRST.TR"NS.UNITS?
0031: R.RE1JTRS..1URR.1OSTK 8 R.NE;:TRST.TR"NS.V"9UE?
0032: R.RE1JTRS.."VE.PRI1EK 8 R.NE;:TRST.TR"NS.PRI1E?
0033: 1"99 5.;RITE:@5.TRN.S."RE..O9INE@<H.I<R.RE1?
0034: EN E9SE
0035: R.RE1JTRS..1URR.POSITIONK L8 R.NE;:TRST.TR"NS.UNITS?
0032: R.RE1JTRS..1URR.1OSTK L8 R.NE;:TRST.TR"NS.V"9UE?
0034: R.RE1JTRS.."VE.PRI1EK 8 ::R.RE1JTRS..1URR.POSITIONK$R.RE1JTRS ..1URR.1OSTK? L
:R.NE;:TRST.TR"NS.UNITS? $ R.NE;:TRST.TR"NS.V"9UE???I:R.RE1JTRS..1URR.POSITIONK L
.NE;:TRST.TR"NS.V"9UE??
0036: 1"99 5.;RITE:@5.TRN.S."RE..O9INE@<H.I<R.RE1?
0037: EN
0040: EN E9SE
0041: I5 R.NE;:TRST.TR"NS"1TION.T!PE? E3 =S"9E= T.EN
0042: R.RE1JTRS..1URR.POSITIONK >8 R.NE;:TRST.TR"NS.UNITS?
0043: R.RE1JTRS..1URR.1OSTK >8 R.NE;:TRST.TR"NS.UNITS? $ R.RE1JTRS.."VE.PRI1EK
0044: 1"99 5.;RITE:@5.TRN.S."RE..O9INE@<H.I<R.RE1?
0045: EN
0042: EN
0044: RETURN
0046: EN
Figure 1.) Ver'io$ Aut*ori+atio$ routi$e
Application Program Interfaces Page 2 of 25
T24 Technical Training
1.2.2.' INPUT ROUTINE (Fi!d ''.1#
( subroutine may be e3ecuted at the unauthori<ed sta$e of transaction
processin$, as the final sta$e before updatin$ unauthori<ed files. 1ultiple
routines may be defined by e3pandin$ the multi4values. .outines called at this
sta$e may be used to update local files, or to provide additional chec#in$ or
override processin$. (t this point of the transaction, all standard default and
validation processin$ will have ta#en place.
,)/UT..OUT,)* user-deined su!routine
To =run> the !*.S,O) simply enter the application name with the version
reference. S1S control can be defined specifically for the !*.S,O) by enterin$
the name of the !*.S,O), with the comma, in US*., in the field !*.S,O).
+onse%uently you can restrict access to the records, as well as the application
itself.
E%&'()e*
+onsider a version for e3ample +USTO1*.,T*ST. S1S control is defined for
the version in US*..
Figure 1., SMS o$tro# "or -er'io$
APPLI.ATION Specifies the (pplication used to access records belon$in$
to the +ompany specified in the related +O1/()5 .*ST..
E%. CUSTOMER
VERSION Specifies a particular !ersion which may be used to access
records for the (pplication entered in the correspondin$
(//L,+(T,O) E%. CUSTOMER+TEST
FUN.TION Specifies the functions that may be used to access records
of the application entered in the (//L,+(T,O) field. E%. L S
Application Program Interfaces Page 4 of 25
T24 Technical Training
FIELD NO Specifies a$ainst which field the condition is to be met. E%
N&tion&)it, -1./
DATA..OMPARISON Specifies the type of comparison to be made between the
contents of the field indicated in 2,*L-.)O and the values
specified in -(T(.2.O1 and -(T(.TO. E%. E0
DATA.FROM Specifies the value, or start of a ran$e of values, with which
the contents of the field indicated in 2,*L- )O are to be
compared with. E% US
DATA.TO Specifies the end of a ran$e of values with which the
contents of the field indicated in 2,*L- )O are to be
compared with.
The version +USTO1*.,T*ST limits the user to listin$ and seein$ only those
records of the customer application where the nationality is US.
1.2." OVERRIDE.CLASS.DETAILS
OVERRIDE.CLASS.DETAILS allows a subroutine to be defined to manipulate an
override messa$e so that the conditions defined in this table may be applied to it.
2or e3ample, an overdraft messa$e could be converted into local currency for
allocatin$ an override class dependin$ on the amount.
1.2.1 PGM.FILE
The PGM.FILE has several uses for developers wishin$ to customise GLOBUS.
-efinition of Subroutines to be used in applications
-efinition of new applications to be run on4line
'-efinition of routines which may be run in the batch
1.2.1.1 PROGRAM -I"/
2or on4line applications the #ey to this record must be the same as the pro$ram
to be run.
For'&t* Subroutine name
Subroutine name is the name of the application, which can be invo#ed. The field
T5/* indicates the application type to be e3ecuted. 2or on4line use this may
0,U,L,T,W or 1. This is invo#ed from .U).(//L,+(T,O)
(ny application of types 0,U,L,T or W are used to maintain a file and must
conform to the standard T*1/L(T* application type.
Type 1 routines are used to e3ecute a specific main line pro$ram where there is
no standard file maintenance re%uired, for e3ample a conversion pro$ram, or
Application Program Interfaces Page 6 of 25
T24 Technical Training
pro$ram to print a report. Where a history is re%uired of a pro$ram bein$ run, a
type W pro$ram should be used.
When a type 1 pro$ram is written, it 'ust contain a SUB.OUT,)* statement at
the start in order to return to GLOBUS once e3ecuted.
*3ample& The type 1 pro$ram SB.L,ST.LO+7s allows an operator to list the
active system loc#s.
The pro$ram for SB.L,ST.LO+7S is as follows&
???@& SUB.OUT,)* SB.L,ST.LO+7S
???6& A
???B& A This pro$ram performs the L,ST..*(-U command
???C& A
???D& *E*+UT* F+SF ; A +lear Screen
???G& *E*+UT* FL,ST..*(-UF
???H& +.T F/ress .eturn TO .eturn to GLOBUSF&
???I& ,)/UT W(,T
???J& .*TU.)
??@?& A
??@@& *)-
The /G1.2,L* record for SB.L,ST.LO+7S is as follows&
The result of e3ecution of SB.L,ST.LO+7S subroutine at GLOBUS (ction prompt
is as follows&
Application Program Interfaces Page 7 of 25
T24 Technical Training
1.2.1.2 2ATC3.4O2
This field is used to define the names of subroutines, or Uni!erse commands,
which may be e3ecuted from the GLOBUS BATCH.CONTROL process. To be
e3ecuted durin$ the end of day the B(T+0.KOB must be defined on a BATCH
record.
For'&t* Subroutine name or !niVer"e Comman#
Subroutine name is the name of the application, which can be invo#ed.
!ni$er"e Comman# i" the name of the item defined in the local !O+ file to be
e3ecuted.
This is a multi4valued field, and several subroutines and or commands may be
e3ecuted se%uentially. This is invo#ed from B.,),T,(T*./.O+*SS. ( subroutine
may be written to perform specific end of day processin$. This may have a
variety of functions, such as maintenance of local files8applications, production of
reports, interface file production etc.
( Uni!erse command, or para$raph can also be e3ecuted from this option. (ny
item reco$nised in the !O+ file of the correct type may be e3ecuted.
Application Program Interfaces Page 10 of 25
T24 Technical Training
1.2.1 2ATC3.CONTROL
(/, calls li#e subroutine, script, crystal report or en%uiry can be run at the pre
batch sta$e. 1ultiple calls may be defined by e3pandin$ the multi4values.
For'&t* Subroutine name
,t has to be defined in !O+
SPT S%ri&t Name
,t has to be defined in 2.S+.,/T.-*S,G)*.
RPT Re&ort Name
,t has to be defined in 2..*/O.T.+O)T.OL and it has to be a crystal report.
EN' En(uir) Name
,t has to be defined in 2.*)LU,.5
This is a multi4valued field and several (/, calls may be e3ecuted se%uentially.
This is invo#ed from B(T+0.+O)T.OL. This routine is called Must before control
passes to the batch menu.
1.5 S#STEM MANAGEMENT CUSTOMISATION
1.5.1 Introduction
This section contains details of options available to users for customisation of
system mana$ement. This includes the ability to be able to define commands or
e3ecutable pro$rams" to perform system bac#ups as part of the end of day
process.
1.5.2 SPF
The SPF file allows definition of the commands" used to perform the system
bac#up and restore at end of day.
1.5.2.1 UNI$ 2AC6UP &nd UNI$ RESTORE
These fields allow definition of the U),E bac#up and restore commands to be
e3ecuted when the end of day process is run.
For'&t* !NI* %omman# name
!NI* %omman# name may contain any U),E commands" to be e3ecuted. ,t
may also contain a shell script. This is invo#ed from S5ST*1.B(+7U/ and
S5ST*1..*STO.*
1.1 REPORTING 7 EN0UIR# CUSTOMISATION
Application Program Interfaces Page 11 of 25
T24 Technical Training
1.1.1 Introduction
The GLOBUS utilities REPGEN and EN'!IR+ provide several (/,s for users
who wish to perform operations on data outside the delivered functionality.
GLOBUS also provides options for users to redirect output from reports or micro4
fiches, which could include definition of their own subroutines.
1.1.2 EN0UIR#
The EN'!IR+ application provides three main areas where local routines may
be added to provide additional functionality. These are&
'Selection of data where criteria cannot be easily specified within the
e3istin$ application this will be covered under STANDARD.SELECTION"
'+O)!*.S,O) routines to manipulate8enhance data to re%uired format
BU,L-..OUT,)* to build initial data to base en%uiry.
1.1.2.1 CON8ERSION
Local conversion routines may be written to manipulate e3tracted data.
For'&t* "ubroutine name
Subroutine name is the name of the Universe subroutine to be e3ecuted. )ote
the re%uired space between N and the name. This is invo#ed from
*)L.BU,L-./(G* for each item the conversion is associated with.
The en%uiry system has its own common area I9EN0UIR#.COMMON which
must be inserted at the start of all conversion routines. This allows access to the
variables controllin$ the en%uiry processin$.
The followin$ variables are the most li#ely ones to be re%uired when writin$ a
conversion routine&
,- +urrent id of the record bein$ processed
...*+O.- The current record bein$ processed
O.-(T( The current incomin$ data bein$ processed. This is also the
returned data.
!+ The current multi4value number bein$ processed
S The current sub4value number
!1.+OU)T The ma3imum number of multi4values within the current record
S1.+OU)T The ma3imum number of sub4values within the current record
Application Program Interfaces Page 12 of 25
T24 Technical Training
E%&'()e*
The followin$ e3ample shows a routine, which displays either the actual maturity
date of an L-811 deal, or displays the number of days notice&
1.1.2.2 2UIL".ROUTINE
( routine may be called prior to the selection phase of the en%uiry when runnin$
the en%uiry. This routine should be used to manipulate the data prior to selection,
for instance it could be used to build a wor# file.
For'&t* Subroutine name
Subroutine name is the name of the Universe subroutine to be e3ecuted. 1ore
than one routine may be specified. This is invo#ed from T.*)LU,.5.S*L*+T and
S.*)LU,.5.S*L+T,O). ,t uses one ar$ument 4 EN', -here EN' is a dynamic
array containin$ the entered selection criteria as follows&
EN'./0 )ame of en%uiry
EN'.1,20 Selection field names
EN'.3,20 (ssociated Operands
EN'.4,2,)0 -ata List
The data passed in EN' should be used within the subroutine to determine the
action to be ta#en. )o data is re%uired to be returned to the en%uiry system.
1.1.2.5 E$TERNAL LIN6 TO EN0UIRIES
Application Program Interfaces Page 13 of 25
T24 Technical Training
The en%uiry system is not dependent on bein$ invo#ed by the selection screen
*)L. ,t can be invo#ed from applications providin$ they are runnin$ under
GLOBUS" usin$ the followin$ ar$ument synta3&
+(LL *)LU,.5.-,S/L(5 '''"
where ''' is a dynamic array with the format&
'''./0 *n%uiry name #ey to 2.*)LU,.5"
'''.1,20 Selection field names
'''.3,20 (ssociated selection operands
'''.4,2,)0 (ssociated selection data
'''.5,60 1ulti valued list of sort re%uirements
'''./70 -isplay mode O ,t can be&
OUT/UT /rint in report format
)ull -isplay to screen
/ /rint of screen format
1.1.5 STAN"AR" SELECTION
The STANDARD.SELECTION application allows definition of local subroutines,
which can be used as selection items in the *n%uiry system. These can be used
within en%uiry to perform selections of data not possible throu$h the e3istin$
system. They can also be used to build virtual records containin$ data from
different files; this can be achieved usin$ a )O2,L* record type.
1.1.5.1 S#S.FIEL".NO &nd USR.FIEL".NO
These fields are used to hold the routine name when the associated S5S.T5/*
or US..T5/* is a type ..
For'&t* Subroutine name
Subroutine name is the name of the subroutine to be e3ecuted. This is invo#ed
from +O)+(T.L,ST./.O+*SSO.
Ar:u'ents* RTN.LIST
where RTN.LIST is a dynamic array containin$ the selected #eys to be returned
to the en%uiry system, separated by field mar#ers N21".
The main purpose of usin$ a routine at this point is to return a list of #eys for the
en%uiry process to use. /ossible reasons for usin$ a routine may be, the
selection re%uired mi$ht not be possible to enter directly in the en%uiry system;
re%uire additional chec#s are re%uired; the selection may simply be too slow and
re%uires an alternative access method.
Since the routine will need to use the common en%uiry variables, the insert
I9EN0UIR#.COMMON should always be inserted at the top of the subroutine.
The main variables li#ely to be re%uired are&
Application Program Interfaces Page 14 of 25
T24 Technical Training
-.2,*L-SPEQ +ontains a list of the Selection 2ield )ames
-.LOG,+(L.O/*.()-SPEQ +ontains a list of the associated operands
entered in numeric form. The followin$ values
are used&
@ *L
6 .G
B LT
C GT
D )*
G L7
H UL
I L*
J G*
@? ).
@@
-..()G*.()-.!(LU*PE,5Q (ssociated entered values.
The routine must perform the re%uired processin$ to build the RTN.LIST. )ote
that if this routine is bein$ used to 9pre4select: data ready for a further selection
within the en%uiry system, if no records are returned, the en%uiry system will
attempt to select the whole file. This may have performance implications.
1.1.5.2 NOFILE St&nd&rd Se)ection Records
,f the information that needs to be presented in an en%uiry does not e3ists in the
sin$le file, then the en%uiry can be made to ta#e information form routines. To do
this first let us understand the way in which en%uiry subsystem wor#s.
The en%uiry subsystem first builds up list of ,-s, then pic#up each ,- and
constructs a record and then displays the records. ,f the information needs to
present does not e3ists in a file then subroutine can be written to do the tas#.
Basically 6 routines needs to be written 4 One which will construct the list of ,-s
and one which will accept the ,- and build the record based on ,-.
,f the field is specified in an en%uiry the type and position of the field is retrieved
from the standard selection record of the file mentioned in the 2,L*.)(1*.
Standard selection is an application that basically stores the dictionary for a file.
5ou could have data fields and lo$ical fields i.e. the information is a calculated
value for e.$. from a subroutine". 0owever $enerally when you try to input a
standard selection record it will validate if a 2,L*.+O)T.OL record e3ists for the
file. The only e3ception to this is if the SS record id be$ins with =)O2,L*>. So for
our above re%uirement we will need to create an SS record with ,- startin$ with
=)O2,L*>. ,n the record for the ,- field ma#e it an . type field and attach a
routine that would build a dynamic array of ids that need to be displayed in the
en%uiry.
Application Program Interfaces Page 15 of 25
T24 Technical Training
,R*)LU,.5.+O11O), a common file that is used in en%uires O defines a
variable called O.-(T( which contains the ,- of the record that is currently $oin$
to be displayed. (nother common variable called ...*+O.- a dynamic array"
is used by the en%uiry subsystem to display the record. So you need to write a
routine that would use the id defined in O.-(T( and populate ...*+O.-.
Ste(1* ;rite t<e routine 'entioned !e))o=.
SUBROUTINE NOFILE.ROUTINE(Y.ID.LIST)
*
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.CUSTOMER
$INSERT I_ENQUIRY.COMMON
*-----------------------------------------------------------------------
MAIN.PARA:
*=========
*
LOCATE "CUSTOMER.CODE" IN D.FIELDS<1 SETTIN! YCUST.POS ELSE
RETURN
*
IF D.LO!ICAL.OPERANDS<YCUST.POS = "" T#EN RETURN
!OSUB OPEN.REQD.FILES
!OSUB LIST.CUST.NOS
*
Y.ID.LIST = Y.CUST.ARRAY
*
RETURN
*
*-----------------------------------------------------------------------
-
*
OPEN.REQD.FILES:
*===============
*
F.CUSTOMER = ""
FN.CUSTOMER = "F.CUSTOMER"
CALL OPF(FN.CUSTOMER$F.CUSTOMER)
*
RETURN
*---------------------------------------------------------------------
*
LIST.CUST.NOS:
*=============
Y.CUST.ARRAY = ""
Y.SEL.SET = ""
Y.E%EC = ""
Y.% = ""
YCUST.LIST = ""
*
Y.OPERAND = D.LO!ICAL.OPERANDS<YCUST.POS
Y.C#&.'ALUE = D.RAN!E.AND.'ALUE<YCUST.POS
Application Program Interfaces Page 12 of 25
T24 Technical Training
*
IF Y.OPERAND = 1 T#EN
Y.I = (
Y.I )= 1
Y.CUST.ID = Y.C#&.'ALUE<1$1$Y.I
READ Y.CUST.REC FROM F.CUSTOMER$ Y.CUST.ID ELSE Y.CUST.REC = ""
IF Y.CUST.REC T#EN
Y.CUST.ARRAY<-1 = Y.CUST.ID
END
END
*
IF Y.OPERAND = * T#EN
Y.I = 1
Y.% = Y.C#&.'ALUE<1$1$Y.I
Y.SEL.SET = " SSELECT ": FN.CUSTOMER
CALL EB.READLIST(Y.SEL.SET$SEL.LIST$""$NO.OF.REC$ERR1)
LOOP
REMO'E FIRST.ID FROM SEL.LIST SETTIN! POS
+#ILE FIRST.ID:POS
IF FIRST.ID NE Y.% T#EN
Y.CUST.ARRAY<-1 = FIRST.ID
END
REPEAT
END
RETURN
*----------------------------------------------------------
END
Ste(2* ;rite &not<er routine to in>o?e =it<in en@uir,.

SUBROUTINE ACT.BAL
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
$INSERT I_F.CUSTOMER
$INSERT I_F.ACCOUNT
FN.ACCOUNT = "F.ACCOUNT"
CALL OPF(FN.ACCOUNT$F.ACCOUNT)
TOT = (
IF O.DATA NE "" T#EN
SEL.REC = "SELECT ": FN.ACCOUNT
SEL.REC := " +IT# CUSTOMER EQ ":O.DATA
SEL.REC := " TO 1"
CALL ,#US#IT(1)
E%ECUTE SEL.REC
CALL ,#US#IT(()
LOOP
READNE%T &.RECORD FROM 1 ELSE &.RECORD = ""
+#ILE &.RECORD DO
READ R.RECORD FROM F.ACCOUNT$ &.RECORD ELSE R.RECORD = ""
Application Program Interfaces Page 14 of 25
T24 Technical Training
IF R.RECORD T#EN
TOT = TOT ) R.RECORD<AC.ONLINE.ACTUAL.BAL
END
REPEAT
O.DATA = TOT
END
RETURN
END
Ste(5* Cre&te ne= St&nd&rd Se)ection record =it< t<e o))o=in: det&i)s.
Application Program Interfaces Page 16 of 25
Ro%'ine Na,e
T24 Technical Training
Ste(1* Cre&te en@uir, =it< t<e o))o=in: det&i)s.
1.1.1 REPGEN.CREATE
The rep$en utility allows use of subroutines in two areas&
'1O-,2,+(T,O)
'2L.-*+,S,O).2.
1.1.1.1 FL."ECISION.FR
.ep$en allows a subroutine to be entered to perform a selection. The value SUB
must be entered in 2L.-*+,S,O) to indicate that this field contains a sub4routine
definition.
For'&t* Subroutine name
Subroutine name is the name of the subroutine to be e3ecuted. Only one
subroutine may be defined per read file. The "ubroutine name must be defined
on /G1.2,L* file as a type S application. This is invo#ed from .GS.... pro$ram
$enerated. ,t uses the ar$ument FILENAME, -8i%8 is the full filename to be
selected.
The routine should perform the re%uired selection of the 2,L*)(1* supplied and
return an ACTI8E select list to the .GS... pro$ram. The .*/G*).SO.T record
is available in ..)*W, and may contain specified values in the fields
+O)ST()TS.
1.1.1.2 MO"IFICATION
Application Program Interfaces Page 17 of 25
T24 Technical Training
The 1O-,2,+(T,O) field allows a sub4routine to be called to manipulate the
e3tracted data.
For'&t* N Subroutine name9n
Subroutine name is the name of the Universe subroutine to be e3ecuted. 9n
denotes the ar$ument number in the call to the subroutine. The subroutine must
be defined in PGM.FILE as a type . routine, to$ether with the re%uired number
of parameters in field (--,T,O)(L.,)2O as
./(.33, ..33".
The actual name of the sub4routine must be defined in the PGM.FILE record in
the field B(T+0./.O+*SS prefi3ed by a N. This is invo#ed from .GS....
pro$ram $enerated.,t uses the ar$uments 4 Par/, Parn -here Parn may be any
number of parameters at least one" as per the definition in PGM.FILE.
(ll details re%uired in the subroutine from the rep$en must be passed into the
subroutine as separate ar$uments. ( sin$le value may be returned.
1.1.. PRINTER.I"
(llows definition of a command or routine" which can be used to create a file of
printed output. This means that whenever GLOBUS output is directed to this
printer id the command will be invo#ed.
1.1...1 COMMAN"
(ny Uni!erse command or subroutine may be specified here. Usually a U),E cat
command will be used to build a file.
For'&t* Comman#
Comman# may be any e3ecutable command from Universe. ,t is invo#ed from
*E*+UT*.+O11()-.
The routine is driven from 2.0OL-.+O)T.OL, and will be able to pass the id in
the command line. This can then be accessed within any re%uired routine usin$
the system variable NS*)T*)+*.
2or e3ample, the command specified could be&
LO+(L./.,)T.LO(- S0OL-.+O)T.OLQN,-S
The routine would then have to chec# NS*)T*)+*T9 9,6,@U in order to e3tract
the ,-.
Application Program Interfaces Page 20 of 25
T24 Technical Training
1.. "ELI8ER# S#STEM
1...1 Introduction
The GLOBUS delivery system provides the ability for user defined routines for
mappin$ messa$es, control of disposition, processin$ SW,2T interfaces, and for
formattin$ inward and outward Swift messa$es. The -elivery system has been
further opened up to enable users to define their own formattin$ rules for
messa$es and to write interface routines, usin$ the Generic -elivery ,nterface.
1...2 "E.FORMAT.S;IFT
The DE.FORMAT.S:IFT application allows a subroutine to be called for a
particular Swift 2ield when processin$ incomin$ Swift messa$es
1...5 "E.;OR"S
This application allows a user routine to be defined for a $iven lan$ua$e to allow
translation of numbers to words.
1...1 "E."ISP.CONTROL
( user4defined routine may be called to provide enhanced selection for
disposition control.
1.... "E.MAPPING
The DE.MAPPING application allows a user subroutine to modify the information
passed to (//L,+(T,O).0()-O22 by the callin$ application and hence to map
additional data which is not normally available for the messa$e type.
1...A "E.CARRIER
The delivery carrier file, DE.CARRIE., contains details of all the carriers
available in -elivery. To enable a carrier, it must be specified on the -elivery
/arameter file, DE.PAR1.
The ,- of this file is the name of the carrier, as used in DE.PROD!CT. *ach
record contains the address type to be used for the carrier i.e. when accessin$
DE.ADDRESS", the formattin$ rules ;DE.FORMAT.%arrier" and the carrier
module e.$. -*.O.++.SW,2T". ,f the carrier module is G*)*.,+, i.e. the
messa$es are handled by the $eneric pro$ram DE.CC.GENERI+, interface must
be specified. The interface must reference a record on DE.INTERFAC*, which
contains details of the protocol for all $eneric interfaces non4$eneric interface
details are stored on the parameter file, DE.PAR1".
When the record is authorised, formattin$ and carrier files are created if they do
not already e3ist. These files are 2.-*.O.1SG.format4module and
2.-*.O./.,.format4module for the formattin$ files and 2.-*.O.1SG.interface and
2.-*.,.1SG.interface for the interface files.
1...B "E.INTERFACE
Application Program Interfaces Page 21 of 25
T24 Technical Training
This file contains details of the protocols for all interfaces which use the Generic
-elivery ,nterface. The protocols for interfaces written prior to the introduction of
the Generic -elivery ,nterface are either stored on DE.PARM or are hard4coded
in the pro$ram. Se%uence numbers for e3istin$ interfaces are stored on
2.LO+7,)G.
The id of the file is the interface as defined in the interface field on -*.+(..,*..
There is little validation of the fields on DE.INTERFAC*. This is to allow for
ma3imum fle3ibility when new interfaces are written. *ach field can be used to
control how the interface is defined and used and more information can be found
in the 0elpte3t.
1...C "E.MESSAGE
( routine can be defined to process inward messa$es to $enerate 2unds
Transfers usin$ the O2S module.
1...D F".ACTI8IT#
The 2iduciary application allows subroutines to be called to modify the contents
of data passed to delivery from the application.
1...1E MG.ACTI8IT#
The mort$a$e application allows subroutines to be called to modify the contents
of data passed to delivery from the application.
1.A INTERFACES - LOCAL CLEARING
1.A.1 Introduction
GLOBUS provides options for allowin$ the re%uired additional functionality to be
added to the 2unds Transfer module in order to allow local clearin$ transactions
to be entered accordin$ to the local rules. This functionality is provided by the
parameter file FT.BC.PARAMETER for the local clearin$ transaction types, B+,
B, and B-. The parameter allows subroutines to be added to perform specific
local validation, and update of cross4reference files and production of
additional8new delivery messa$es.
( further option allows a sub4routine to be invo#ed from the delivery processin$,
which can allow diversion of messa$es with different carriers into the local
clearin$ system accordin$ to the coded rules.
Application Program Interfaces Page 22 of 25
T24 Technical Training
1.A.2 FT.2C.PARAMETER
This application allows customisation of e3istin$ field level validation for the B+
2unds Transaction type. (dditionally subroutines may be defined to perform
specific local validation within the 2T module in the followin$ fields&
2T.!(L,-(T,O)..T)
2T.-*L,!*.5..T)
STO.!(L,-(T,O)..T)
BUL7.STO.!(L,-..T)
(dditionally the ability to define subroutines called from the C!STOMER and
ACCO!NT applications is provided in the fields&
(++OU)T.U/-..T)
+USTO1*..U/-..T)
( subroutine to allow diversion of messa$es into the local clearin$ system within
the delivery system may be defined in&
-,!*.S,O)..T)
1.A.5 FT.TAPE.PARAMS
The FT.TAPE.PARAMS application mana$es import and e3port of data for the
local clearin$ systems" installed. -ata is typically downloaded or uploaded onto
tapes, or directly to a specified file. Subroutines and commands may be defined
for each type of interface which are used for&
LO(-.+1-
LO(-..OUT,)*
U/-(T*..OUT,)*
+.*(T*.+1-
+.*(T*..OUT,)*
G*)*.(T*..OUT,)*
*)L./U.G*..OUT,)*
1.A.1 AC.ENTR#.PARAM
The AC.ENTR+.PARAM application controls the Generic (ccountin$ ,nterface. ,t
contains boo#in$ details of entries supplied in an e3ternal (S+,, file, and the
layout of the file. The standard routine (+.,)W(.-.2,L* should be used as the
U/-(T* routine in FT.TAPES to run the $eneric interface. (dditional validation is
possible by callin$ user routines.
Application Program Interfaces Page 23 of 25
T24 Technical Training
1.B LOCAL STATUTOR# REPORTING
1.B.1 Introduction
GLOBUS allows subroutines to be called at input time for the applications
F!NDS.TRANSFE.. DATA.CAPT!R*, TELLER and DRA:INGS, which can
validate and default local reference values used in local reportin$. Typically an
activity code will be allocated accordin$ to the type of contract entered.
1.B.2 2AN6.RETURN.PARAMS
This application allows definition of subroutines to be called from the T*LL*.,
2U)-S.T.()S2*., -(T(.+(/TU.* and -.(W,)GS applications at input
time to allow defaultin$ and validation of local reference items. The record
applicable to the company is defined in LO+(L./.O+*SS in the COMPAN+
record.
1.C TA6EO8ER 7 INSTALLATION CUSTOMISATION
1.C.1 Introduction
,n order to assist the ta#eover of e3istin$ systems when installin$ GLOBUS, the
system allows lin#a$e of subroutines. Subroutines will usually be re%uired to
perform processin$ which allows e3istin$ file structures to be mapped into the
appropriate GLOBUS data files.
1.C.2 ALT.ACCT.PARAMETER
The application ALT.ACCT.PARAMETE., allows definition of the details of the
account number structure in the e3istin$ system. The old account number is
stored in a cross4reference table lin#in$ it to the new GLOBUS account number,
called ALTERNATE.ACCO!NT.
1.C.5 E2S.AUTO.FUNCTION
The system allows a subroutine to be inserted when buildin$ the input buffer
when contents need to be calculated, and when maintainin$ totals for the records
processed.
1.C.1 TA6EO8ER.MAPPING
Subroutines may be defined in TA<EOVER.MAPPING to format data into the
e3pected GLOBUS format from the source files, and to manipulate data
accordin$ to specific rules. 2or e3ample a cross4reference table may need to be
maintained in order to build the correct lin# between GLOBUS records.
Application Program Interfaces Page 24 of 25
T24 Technical Training
1.D LIMITS
1.D.1 Introduction
,n order to allow comple3 calculations of ris# factors to be applied to limit
products or sub4products, the L,1,T..*2*.*)+* application allows definition of
a subroutine, which may be invo#ed. The subroutine will return the amount of a
$iven transaction to be recorded in the limits system.
1.1E COMPAN# CUSTOMISATION
1.1E.1 Introduction
,n order to allow for different account number structures and chec#di$it
calculations, the chec#di$it type may be defined as a user routine, which will
perform the desired formattin$ and chec#di$it validation. This routine should also
return the ne3t available id if called from the (++OU)T application with 2B or 26
entered at awaitin$ id. The routine is specified in the COMPAN+ record.
Application Program Interfaces Page 25 of 25

You might also like