Posts

Showing posts with the label t24 jobs

How to attach drop down enquiry to many versions quickly?

 In T24 R8+  you can use the application called EB.DYNAMIC.ATTRIBUTES in that create a record called SYSTEM and you can attach a routine in VERSION.RTN which will be triggered for all VERSION's before displaying so you can just modify the R.VERSION and send it back with the drill down enquiry you want to attach then it will be displayed to the user in Browser

A program to sort numbers

This program will sort numbers based on their values. Usually SORT will sort not based on the value of the numbers PROGRAM TEST.SORT $INCLUDE T24.BP I_COMMON $INCLUDE T24.BP I_EQUATE Y.ARR1 = 1:FM:4:FM:2:FM:8:FM:6:FM:3:FM:13 Y.ARR2 = '1':FM:'4':FM:'2':FM:'8':FM:'6':FM:'3':FM:'13' Y.CNT = DCOUNT(Y.ARR2, FM) FOR I = 1 TO Y.CNT Y.SORT.ITEM = MAXIMUM(Y.ARR2) Y.SORT.ARR := FM:Y.SORT.ITEM LOCATE Y.SORT.ITEM IN Y.ARR2 SETTING Y.ITEM.POS THEN DEL Y.ARR2<Y.ITEM.POS> END NEXT I DEL Y.SORT.ARR<1> CRT Y.SORT.ARR STOP

Reverse Locate

You can locate from the back of the string using option "DR" in the locate command. Example:  PROGRAM TEST.LOCATE$INCLUDE T24.BP I_COMMON $INCLUDE T24.BP I_EQUATE Y.STRING = 30:VM:30:VM:30:VM:30:VM:30:VM:30 LOCATE 30 IN Y.STRING<1,1> BY "DR" SETTING POS THEN CRT POS END STOP The result will be 6. Usually the answer will be 1 using LOCATE command