T24: Commands

1,551 views
Skip to first unread message

Igor Micev

unread,
Jun 24, 2009, 2:08:40 PM6/24/09
to jBASE
Hi all

How to know which all tables are being checked by executing a command
(DBR(), F.REDA(), EB.READLIST() ...)

Igor

ufuktu

unread,
Jun 30, 2009, 7:00:09 AM6/30/09
to jBASE
Hi, unfortunately! I do not exactly understand what the question is,
but I am posting a typical example of F.READ;

*Account File;
FN.ACCOUNT = 'F.ACCOUNT' ; F.ACCOUNT = ''
*Open File
CALL OPF(FN.ACCOUNT,F.ACCOUNT)
*Read the file
CALL F.READ(FN.ACCOUNT,Y.ACCT.NO,R.ACCT.REC,F.ACCOUNT,ERR1)

Where Y.ACCT.NO is the input for the account file and R.ACCT.REC is
the output :))
if you want to extract the currency;
Y.ACCT.CUR = R.ACCT.REC<AC.CURRENCY>

If this is not you asked for please post a reply giving more details.

Igor Micev

unread,
Jun 30, 2009, 8:59:43 AM6/30/09
to jB...@googlegroups.com
Okey,

I'll give you more explanation about my question.
When a DBR() command is executed some tables are checked like STANDARD.SELECTION, FILE.CONTROL, ... and some others.

The question is not only for DBR() or F.READ(), but for all other system commands.
Where/how to see all the tables that are checked by executing the commands?

Thanks
Igor


--
Igor Micev

VK

unread,
Jul 1, 2009, 2:19:58 AM7/1/09
to jBASE
Hi,
if you're under Unix you can trace system calls (including files
opening) using truss or tusc.

VK

Igor Micev

unread,
Jul 3, 2009, 7:48:36 AM7/3/09
to jBASE
Hi

I know that there are commands like truss, tusc. I tried them and they
work well, but did't manage to apply them on a jBase commands. I
really don't know how to do that.
Anyway, I want to parse routines' code and when i meet T24 routines
like EB.ROUND.AMOUNT(), CDD(), F.WRITE/READ() ... to be able to get
all the tables in the system that are checked.

Regards
Igor

Jim Idle

unread,
Jul 3, 2009, 11:35:58 AM7/3/09
to jB...@googlegroups.com
Igor Micev wrote:
> Hi
>
> I know that there are commands like truss, tusc. I tried them and they
> work well, but did't manage to apply them on a jBase commands. I
> really don't know how to do that.
> Anyway, I want to parse routines' code and when i meet T24 routines
> like EB.ROUND.AMOUNT(), CDD(), F.WRITE/READ() ... to be able to get
> all the tables in the system that are checked.
>
>
To do this from source code would be rather more difficult than you
expect. For instance I doubt that you could reliably do this with static
analysis and flow analysis between subroutines in jBC is essentially a
global analysis for which you need source code for everything, or at
least a reliable description of the interface. As a somewhat contrived
example designed to point out various cases, think of things like this:

SUBROUTINE(i1, s2)

BEGIN CASE
CASE i1=1
fName = s2[1,1]:"f_":i1
CASE i1 =7
fName = s2[1, 4]:"f_":i2
CASE i1 = 88
CALL calcFname(fName, DATE(), s2)
DEFAULT
fName = s2[1,i1]:"FB"
END CASE

CALL F.OPEN(fName, ......

The best you could do is guess. However, with truss or perhaps the jBASE
jprof related commands, you can pick up the actual file names at
runtime, and the trace output can easily be processed with awk or even grep.

Jim

Reply all
Reply to author
Forward
0 new messages