You are on page 1of 7

T24 subroutine


HOME
 T24 NEWS
 T24 DISCUSSIONS
 SEARCH

 Index
 Recent Topics
 Search

 Log in

1. Forum

2.

3. Miscellaneous Topics

4.

5. Training/Learning

6.

7. Accessing Multivalue fields in the T24 --ROUTINE

Accessing Multivalue fields in the T24 --ROUTINE


 START
 PREV
 1
 NEXT
 END

 emushaija
 TOPIC AUTHOR

 Offline
T24 subroutine

 Senior Member

More
10 years 7 months ago - 10 years 7 months ago #7047
Accessing Multivalue fields in the T24 --ROUTINE was created by emushaija
I am trying to test multivalue field for specific condition (value greater than 0) and
add a counter for a particular record. T

Below is pseudo code of what i want to achieve


READ LMM.ACCOUNT.BALANCE
COUNT records in LMM.ACCOUNT.BALANCE = N
FOR i=0 to N
(
COUNT number of occurances multivalue field TRANS.PRIN.AMT in the record i= Z

WHILE Z DO
{IF TRANS.PRINT.AMT(Z) > 0
THEN COUNTER ++
}
Z--
)

Then after executing above pseudo code i want to display the results in below format

LD.NUMBER COUNTER

I am new to T24 programming and will appreciate your help to get the equivalent
infobasic code for above pseudocode
Last edit: 10 years 7 months ago by emushaija.
Please Log in or Create an account to join the conversation.

 jpb


 Offline
 Moderator

 TAFC-R17 - Unix
T24 subroutine

More
10 years 7 months ago - 10 years 7 months ago #7048
Replied by jpb on topic Re: Accessing Multivalue fields in the T24 --ROUTINE
Hello emushaija,

in jBasic (infobasic) there are many way to achive your goal, one pissibility is :
PROGRAM COUNT.LD

$INSERT I_COMMON

$INSERT I_EQUATE

$INSERT I_F.LMM.ACCOUNT.BALANCES

***

FN.LAB = "F.LMM.ACCOUNT.BALANCES"

F.LAB = ""

CALL OPF(FN.LAB,F.LAB)

***

SEL.STMT = "SELECT ":FN.LAB

ID.LIST = '' ; NO.RECS = 0

CALL EB.READLIST(SEL.STMT, ID.LIST, '', NO.RECS, '')

***

IF ID.LIST THEN

LOOP

REMOVE LAB.ID FROM ID.LIST SETTING MORE

WHILE LAB.ID : MORE DO

CNT = 0

READ R.LAB FROM F.LAB,LAB.ID ELSE CONTINUE

Z = DCOUNT(R.LAB<LD27.TRANS.PRIN.AMT>,VM)

FOR I = 1 TO Z

IF R.LAB<LD27.TRANS.PRIN.AMT,I> GT 0 THEN
T24 subroutine

CNT += 1

END

NEXT I

CRT LAB.ID:" ":CNT "3R"

REPEAT

END

STOP

***

END

As this is a progam (to be started a jBase-prompt), you have to make shure you
logged into T24 (in the correct company) before launching it. Else the routine has to
be enlarged to get company details or to be a subroutine (started within T24), but
that a bit more of coding.
Last edit: 10 years 7 months ago by jpb.
The following user(s) said Thank You: emushaija
Please Log in or Create an account to join the conversation.

 emushaija
 TOPIC AUTHOR

 Offline
 Senior Member

More
10 years 7 months ago #7050
Replied by emushaija on topic Re: Accessing Multivalue fields in the T24 --ROUTINE
Thanks a lot jpb .It is a great help.

I have executed the program and it runs very much okey.

Now i am trying to understand the code!!

(i).What is the purpose of the following line

READ R.LAB FROM F.LAB,LAB.ID ELSE CONTINUE?


T24 subroutine

(ii). I have tried to modify the program to routine and run it in T24 works fine. In case
i want to pass the results as array in the routine so i can invoke the results in other
enquiries what would be the modification in the code?
Please Log in or Create an account to join the conversation.

 jpb


 Offline
 Moderator

 TAFC-R17 - Unix
More
10 years 7 months ago #7052
Replied by jpb on topic Re: Accessing Multivalue fields in the T24 --ROUTINE
READ --> www.jbase.com/r5/knowledgebase/manuals/3...es/man/jbc2_READ.htm

I think you're talking about a NOFILE enquiry again, instead of CRT LAB.ID... add it to
OUT.ARR as in the old example : OUT.ARR<-1> = LAB.ID:"*":CNT
Please Log in or Create an account to join the conversation.

 emushaija
 TOPIC AUTHOR

 Offline
 Senior Member

More
10 years 7 months ago #7057
Replied by emushaija on topic Re: Accessing Multivalue fields in the T24 --ROUTINE
Thanks a lot .Now i have understood the whole code except one piece

LD27.TRANS.PRIN.AMT --where is the reference LD27 obtained? i thought it is a field


number but in the the system (Through enquiry ) it is shown as number 4.

Thanks again
Please Log in or Create an account to join the conversation.
T24 subroutine

 jpb


 Offline
 Moderator

 TAFC-R17 - Unix
More
10 years 7 months ago #7058
Replied by jpb on topic Re: Accessing Multivalue fields in the T24 --ROUTINE
Have a look in I_F.LMM.ACCOUNT.BALANCES
should be located in GLOBUS.BP or T24_BP, hope you'll understand what I_F.-files are
for
Please Log in or Create an account to join the conversation.

 emushaija
 TOPIC AUTHOR

 Offline
 Senior Member

More
10 years 7 months ago #7059
Replied by emushaija on topic Re: Accessing Multivalue fields in the T24 --ROUTINE
ok thanks i really appreciate your help.Be blessed
Please Log in or Create an account to join the conversation.

 START
 PREV
 1
 NEXT
 END

1. Forum
T24 subroutine

2.

3. Miscellaneous Topics

4.

5. Training/Learning

6.

7. Accessing Multivalue fields in the T24 --ROUTINE

Time to create page: 0.143 seconds


Powered by Kunena Forum

You might also like