0% found this document useful (0 votes)
41 views3 pages

Build and Convention Routines Overview

The document outlines two subroutines for handling data in a system. The first subroutine, ITSS.BUILD.ROUTINES.EX, manipulates selection criteria based on user-defined categories and their corresponding balance ranges. The second subroutine, ITSS.CONVENTION.ROUTINE, converts loan amounts from foreign currency to local currency before displaying them, ensuring accurate financial representation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

Build and Convention Routines Overview

The document outlines two subroutines for handling data in a system. The first subroutine, ITSS.BUILD.ROUTINES.EX, manipulates selection criteria based on user-defined categories and their corresponding balance ranges. The second subroutine, ITSS.CONVENTION.ROUTINE, converts loan amounts from foreign currency to local currency before displaying them, ensuring accurate financial representation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Build Routine

SOURCE CODE:
$PACKAGE [Link]
* [Link] is not a common variable but a user defined variable that has to be passed to the build routine.
SUBROUTINE [Link]([Link])
*-----------------------------------------------------------------------------
* Build Routines are used to manipulate the selection criteria box.
*-----------------------------------------------------------------------------
* Enquiry that will display Customer Id, the Account Id and the respective working balance after accepting the category
from the user.

* - For category 1001 - Balance should be in the range 0 and 49999


* - For category 6001 - Balance should be in the range 50000 and 100000
* - For category greater than 7000 - Balance should be in the range 100000 and 500000

*-----------------------------------------------------------------------------
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
GOSUB PROCESS

RETURN

PROCESS:

LOCATE 'CATEGORY' IN [Link]<2,1> SETTING [Link] ELSE NULL


[Link] = [Link]<4,[Link]>
LOCATE '[Link]' IN [Link]<2,1> SETTING [Link] ELSE NULL

[Link]<2,[Link]> = '[Link]'
[Link]<3,[Link]> = 'RG'

IF [Link] = 1001 THEN [Link]<4,[Link]> = '0 49999'


IF [Link] = 6001 THEN [Link]<4,[Link]> = '50000 100000'
IF [Link] > 7000 THEN [Link]<4,[Link]> = '100000 500000'

RETURN
*-----------------------------------------------------------------------------
END

TEST IF CATEGORY = 1001:


TEST IF CATEGORY = 6001:

TEST IF CATEGORY > 7000:

- No record matched the selection criteria


Convention Routine
SOURCE CODE:
$PACKAGE [Link]
SUBROUTINE [Link]
*-----------------------------------------------------------------------------
* Conversion routines are used to manipulate the data in a field before display.
*-----------------------------------------------------------------------------
* Enquiry that will list the LD contract numbers, and their respective loan amounts.
* If the loan amount is in foreign currency, they have to be converted to local currency and then displayed.
*-----------------------------------------------------------------------------
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
$INSERT I_F.[Link]
$INSERT I_F.CURRENCY
GOSUB INIT
GOSUB OPENFILES
GOSUB PROCESS
RETURN

INIT:
[Link] = '[Link]'
[Link] = ''
* [Link] holds the record pertaining to the current ID.
[Link] = [Link]<[Link]>
[Link] = ''
RETURN

OPENFILES:
CALL OPF([Link],[Link])
RETURN

PROCESS:
* LCCY Local currency.
IF [Link] NE LCCY THEN
CALL [Link]([Link],[Link],[Link],[Link],LD.ERR1)
* [Link] is the common variable that holds the last extracted value.
* extract the value from [Link] for the foreign currency.
[Link] = [Link]<[Link],1> * [Link]
END
RETURN

END

TEST :

You might also like