-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Marx-wrld/t24-topics
T24 topics
- Loading branch information
Showing
33 changed files
with
1,187 additions
and
261 deletions.
There are no files selected for viewing
265 changes: 265 additions & 0 deletions
265
.rmv/logs/backup/rocket_mv_basic_language_server.2023-08-22-1.log
Large diffs are not rendered by default.
Oops, something went wrong.
171 changes: 171 additions & 0 deletions
171
.rmv/logs/backup/rocket_mv_basic_language_server.2023-08-24-1.log
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
.rmv/logs/backup/rocket_mv_basic_language_server.2023-08-25-1.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2023-08-25 17:58:33.277 [main] WARN com.rs.mv.mvvs.Startup - [LSP:100104]ROCKET MV BASIC EXTENSION exited |
172 changes: 172 additions & 0 deletions
172
.rmv/logs/backup/rocket_mv_basic_language_server.2023-08-26-1.log
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SUBROUTINE VS.AcRandMnemonic | ||
|
||
|
||
$INSERT T24.BP I_COMMON | ||
$INSERT T24.BP I_EQUATE | ||
$INSERT MARX.BP I_VS.COMMON | ||
|
||
rand_mne = RND$Letters(4) : RND$Numbers(4) : RND$Letters(2) | ||
IF R.NEW(AF) EQ '' THEN R.NEW(AF) = rand_mne | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SELECT TOP 10 [CO_CODE], [RECID] FROM V_FBNK_ACCOUNT WHERE WORKING_BALANCE > '0' AND CUSTOMER <> '' | ||
UNION | ||
SELECT TOP 10 [CO_CODE], [RECID] FROM V_FEUI_ACCOUNT WHERE WORKING BALANCE > '0' AND CUSTOMER <> '' | ||
UNION | ||
SELECT TOP 10 [CO_CODE], [RECID] FROM V_FSG1_ACCOUNT WHERE WORKING_BALANCE > '0' AND CUSTOMER <> '' | ||
ORDER BY [CO_CODE]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PROGRAM TestProg | ||
|
||
mobile = '3525747565584' | ||
acc_id = '45764' | ||
txn = 'USD': @FM : 3249.90 : @FM : 'CR' :'Payment for training' | ||
|
||
CALL VS.SendSMSAlert(mobile, acc_id, txn, text) | ||
CRT text | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
SUBROUTINE VS.SendSMSAlert(mobile, acc_id, txn, text) | ||
|
||
$INSERT I_COMMON | ||
$INSERT I_EQUATE | ||
$INSERT I_F.ACCOUNT | ||
|
||
text = '' | ||
dr_cr = 'debited from' | ||
|
||
CALL VS.GetRecord('F.ACCOUNT', acc_id, acc_rec) | ||
acc_name = acc_rec<Account_ShortTitle> | ||
|
||
CALL GET.LOC.REF('ACCOUNT', 'SMS.ALERT', posn) | ||
sms_alert = acc_rec<Account_LocalRef, posn> | ||
|
||
IF sms_alert NE 'Y' THEN RETURN | ||
|
||
currency = txn<1> | ||
amount = txn<2> | ||
details = txn<4> | ||
|
||
IF txn<3> EQ 'CR' THEN dr_cr = 'credited to' | ||
|
||
text = 'Hi ' : acc_name :', ' : currency : ' ' : amount : ' has been ' | ||
text := dr_cr : ' your account ': acc_id : '. Details: ': details | ||
|
||
* Sending SMS | ||
CRT 'Sending SMS to ' : mobile | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$PACKAGE MX.Training | ||
SUBROUTINE MX.Logger(data, err) | ||
|
||
err = '' | ||
|
||
log_file = 'test_' : OCONV(DATE(), 'DG') : '.log' | ||
log_line = OCONV(TIME(), 'MTS') : '|' : data | ||
|
||
OPENSEQ '../bnk.log', log_file TO file_ptr THEN NULL | ||
|
||
WHITESEQ log_line APPEND TO file_ptr ELSE err = 'ERROR: Failed to write to ': log_file | ||
|
||
CLOSESEQ file_ptr | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
PROGRAM MX.TestProg | ||
|
||
$USING MX.Training | ||
|
||
PROMPT 'Enter a text to log: ' | ||
INPUT text | ||
CRT | ||
|
||
MX.Training.Logger(text, err) | ||
IF err NE '' THEN CRT err ELSE CRT 'OK' | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SUBROUTINE VS.FTInpSameCurr | ||
|
||
|
||
$INSERT T24.BP I_COMMON | ||
$INSERT T24.BP I_EQUATE | ||
$INSERT T24.BP I_F_FUNDS.TRANSFER | ||
|
||
IF R.NEW(FT.DEBIT.CURRENCY) NE R.REN(FT.CREDIT.CURRENCY) THEN | ||
ETEXT = "Debit and credit currencies are not the same" | ||
END | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
PROGRAM TEST | ||
|
||
*Program to change the delimiter '.' in phone to '-' | ||
|
||
phone = "354.458.656.778" | ||
|
||
CRT "---BEFORE---" | ||
CRT "Phone : " : phone | ||
|
||
*Function - used when want to save the original value | ||
CRT "---FUNCTION---" | ||
phone1 = CHANGE(phone, ",", "-") | ||
CRT "Phone : " : phone | ||
CRT "Phone1 : " : phone1 | ||
|
||
*Statement - used when we want to permanently change the original value | ||
CRT "---STATEMENT---" | ||
CHANGE "." TO "-" IN phone | ||
CRT "Phone : " : phone | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SUBROUTINE VS.AuthLogAcDetails | ||
|
||
$INSERT T24.BP I_COMMON | ||
$INSERT T24.BP I_EQUATE | ||
$INSERT T24.BP I_F.ACCOUNT | ||
|
||
log_file = ID.NEW : '.log' | ||
log_info = R.NEW(AC.MNEMONIC) : '*' : R.NEW(AC.SHORT.TITLE) : '*' :R.NEW(AC.CURRENCY) | ||
log_info := '*' : R.NEW(AC.CATEGORY) : '*': OPERATOR | ||
|
||
CALL VS.Logger(log_file, log_info, 'INFO', ret_code) | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SUBROUTINE GREETING.SVC.LOAD | ||
|
||
|
||
$INSERT I_COMMON | ||
$INSERT I_EQUATE | ||
$INSERT I_GREETING.SVC.COMMON | ||
|
||
fn_cust = 'F.CUSTOMER' | ||
f_cust = '' | ||
CALL OPF(fn_cust, f_cust) | ||
|
||
RETURN | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SUBROUTINE GREETING.SVC.SELECT | ||
|
||
|
||
$INSERT I_COMMON | ||
$INSERT I_EQUATE | ||
$INSERT I_GREETING.SVC.COMMON | ||
|
||
sel_cmd = 'SELECT ' : fn_cust | ||
CALL EB.READLIST(sel_cmd, sel_list, '', total_rec, ret_code) | ||
CALL BATCH.BUILD.LIST('', sel_list) | ||
|
||
RETURN | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SUBROUTINE GREETING.SVC(cust_id) | ||
|
||
|
||
|
||
$INSERT I_COMMON | ||
$INSERT I_EQUATE | ||
$INSERT I_F.CUSTOMER | ||
$INSERT MARX.BP I_GREETING.SVC.COMMON | ||
|
||
CALL OCOMO('Processing... ': cust_id) | ||
|
||
CALL.F.READ(fn_cust, cust_id, cust_rec, f_cust, err) | ||
IF cust_rec EQ '' THEN | ||
CALL OCOMO('Error: No customer record found with id ' : cust_id) | ||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
COMMON /GREETING.SVC/ fn_cust, | ||
f_cust, | ||
cust_rec, | ||
err, | ||
sel_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SUBROUTINE VS.GetAcctDetails(acct_id, details) | ||
|
||
$INSERT I_COMMON | ||
$INSERT I_EQUATE | ||
$INSERT I_F.ACCOUNT | ||
|
||
details = '{}' | ||
|
||
CALL VS.GetRecord('F.ACCOUNT', acct_id, rec) | ||
details = '{ "id": "' : acct_id : '", "name": "' : rec<AC.SHORT.TITLE> : '", "currency": "' | ||
details := rec<AC.CURRENCY> : '", "balance": ' : rec<AC.WORKING.BALANCE> : '}' | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
PROGRAM VS.ProcessAcctList | ||
PROMPT "Enter the name of the list: " | ||
INPUT list_name | ||
IF NOT(list_name) THEN STOP | ||
READLIST acc_list FROM list_name ELSE | ||
CRT 'List with name ' : list_name : ' does not exist!' | ||
STOP | ||
END | ||
account_list = '[ ' | ||
LOOP | ||
WHILE READNEXT rec FROM acc_list DO | ||
company_code = rec[1, 9] | ||
acct_id = rec[11, 99] | ||
CALL VS.GetAcctDetails(acct_id, details) | ||
account_list<-1> = details : ',' | ||
CRT rec | ||
REPEAT | ||
account_list[1] = ' ]' | ||
CRT account_list | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
PROGRAM VS.ReadFile | ||
|
||
dir = '../bnk.interface/EBANK.IN' | ||
filename = 'transaction.csv' | ||
|
||
OPENSEQ dir, filename TO ptr THEN | ||
LOOP | ||
READSEQ line FROM ptr ELSE BREAK | ||
CRT line | ||
REPEAT | ||
END ELSE CRT 'Failed to open ': filename | ||
|
||
CLOSESEQ ptr | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
component EB.MtdTraining | ||
|
||
# Component Isolation Definition | ||
metamode1Version 1.6 | ||
# ----------------------------------------- | ||
public method VSGetAcctDetails(IN acct_id string, OUT details string) | ||
{ | ||
JBC : VS.GetAcctDetails | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
TESTCASE TestGetAcctDetails | ||
$USING AC.AccountOpening | ||
|
||
UTF.setTarget("EB.MtdTraining.VSGetAcctDetails") | ||
UTF.setDescription("Unit test to get account details in a JSON object") | ||
|
||
id = "89787" | ||
record = "" | ||
record<AC.AccountOpening.Account.ShortTitle> = "John Smith" | ||
record<AC.AccountOpening.Account.Currency> = "USD" | ||
record<AC.AccountOpening.Account.WorkingBalance> = "255565.23" | ||
|
||
UTF.setRecord("F.ACCOUNT", id, record) | ||
|
||
UTF.addParam(id) | ||
UTF.addParam(details) | ||
|
||
UTF.runTest() | ||
|
||
expected = '{ "id": "89787", "name": "JohnSmith", "currency": "USD", "balance": 25564.23}' | ||
|
||
UTF.assetEquals(details, expected) | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$PACKAGE EB.MtdTraining | ||
SUBROUTINE VS.GetAcctDetails(acct_id, details) | ||
|
||
$INSERT I_COMMON | ||
$INSERT I_EQUATE | ||
$INSERT I_F.ACCOUNT | ||
|
||
details = '{}' | ||
|
||
CALL VS.GetRecord('F.ACCOUNT', acct_id, rec) | ||
details = '{ "id": "' : acct_id : '", "name": "' : rec<AC.SHORT.TITLE> : '", "currency": "' | ||
details := rec<AC.CURRENCY> : '", "balance": ' : rec<AC.WORKING.BALANCE> : '}' | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
PROGRAM VS.ProcessAcctList | ||
|
||
PROMPT "Enter the name of the list: " | ||
INPUT list_name | ||
|
||
IF NOT(list_name) THEN STOP | ||
|
||
READLIST acc_list FROM list_name ELSE | ||
CRT 'List with name ' : list_name : ' does not exist!' | ||
STOP | ||
END | ||
|
||
|
||
account_list = '[ ' | ||
LOOP | ||
WHILE READNEXT rec FROM acc_list DO | ||
company_code = rec[1, 9] | ||
acct_id = rec[11, 99] | ||
|
||
IF company_code NE ID.COMPANY THEN CALL LOAD.COMPANY(company_code) | ||
CALL VS.GetAcctDetails(acct_id, details) | ||
account_list := details : ',' | ||
REPEAT | ||
|
||
account_list[1] = ' ]' | ||
|
||
CRT account_list | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SUBROUTINE VS.ValDefaultMnemonic | ||
|
||
|
||
$INSERT T24.BP I_COMMON | ||
$INSERT T24.BP I_EQUATE | ||
$INSERT T24.BP I_F.ACCOUNT | ||
$INSERT MARX.BP I_VS.COMMON | ||
|
||
rand_mne = RND$Letters(4) : COMI | ||
IF R.NEW(AC.MNEMONIC) EQ '' THEN R.NEW(AC.MNEMONIC) = rand_mne | ||
|
||
RETURN | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
SUBROUTINE VS.ValSavingsAc | ||
|
||
|
||
$INSERT T24.BP I_COMMON | ||
$INSERT T24.BP I_EQUATE | ||
|
||
IF NOT (COMI MATCHES "'6'3N") THEN ETEXT = 'AC-CATEG.NOT.SAVING' | ||
|
||
RETURN | ||
END |
Oops, something went wrong.