![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm writing a trigger using CALLX to track who changed a record in a file. I'm using OCONV('','U50BB') in the program to get the person's port/acct/user, but the OCONV returns garbage characters. |
#3
| |||
| |||
|
|
Why not just CALL your tracking subroutine from the appropriate applications that update this file? Often a file is updated by many processes, of which maybe only a few are important to track who did the update. Using a trigger means that all updates by all processes will get logged. |
|
Also, instead of using an old-style user exit, try the @ fuctions. @user, @account, @pib. |
#4
| |||
| |||
|
|
Thanks, Kevin Kevin Powick wrote: Why not just CALL your tracking subroutine from the appropriate applications that update this file? Often a file is updated by many processes, of which maybe only a few are important to track who did the update. Using a trigger means that all updates by all processes will get logged. Turns out the thing that I'm tracking can mainly be done by procs and manually at TCL. I'd like to catch it wherever it happens, that's why CALLX is the best solution. Also, instead of using an old-style user exit, try the @ fuctions. @user, @account, @pib. That was a good idea. I tried it, but it returned null. Sholom |
#5
| |||
| |||
|
|
That was a good idea. I tried it, but it returned null. |
#6
| |||
| |||
|
|
Thanks, Kevin Kevin Powick wrote: Why not just CALL your tracking subroutine from the appropriate applications that update this file? Often a file is updated by many processes, of which maybe only a few are important to track who did the update. Using a trigger means that all updates by all processes will get logged. Turns out the thing that I'm tracking can mainly be done by procs and manually at TCL. I'd like to catch it wherever it happens, that's why CALLX is the best solution. Also, instead of using an old-style user exit, try the @ fuctions. @user, @account, @pib. That was a good idea. I tried it, but it returned null. Sholom |
#7
| |||
| |||
|
|
Sholom, not sure what's going on with your system but here are a couple thoughts: [SNIP] Maybe I just had a major brain fart and just don't remember how that stuff works, so please take this all with a grain of salt. Triggers have been notoriously unstable in earlier versions of D3NT and there have always been problems when trying to process data with triggers between the VME and FSI. I got tired years ago of trying to get these particular toys to play nice together so I simply don't use them unless requested. Same goes for indexes I'm sorry to say. And because I need to code for cross-platform apps, if I don't use triggers or indexes in NT that means I don't use them in *nix either. Shame cuz it's potentially very cool stuff. As with a lot of features, some of us swear by them and others swear at them. I'm hoping to check these things out in D3 7.5. Sorry I can't be more helpful. T |
#8
| |||
| |||
|
|
Also, after compiling and cataloging, you must log off and then back on. It has to do with some caching of pointers for flashed BASIC code. |
#9
| |||
| |||
|
|
Sholom, not sure what's going on with your system but here are a couple thoughts: - I may be wrong about this but as I recall CallX isn't executed in the same process as the mainline code, so the user you get returned from a trigger isn't the same as the user that triggered the event. - I think the user returned from U50bb in a trigger is some varation of the Windows user because the process is executed as an RPC, or it may look something like Username$port$ - The @functions may be returning null for the same reason. There is no underlying process/environment to provide the information being requested. - This could be related to Flash/Non-Flash, VME/FSI, or whether your trigger code is globally catalogued. I won't go into details about when triggers will or won't work, if it's not in the docs then call RD Support. Maybe I just had a major brain fart and just don't remember how that stuff works, so please take this all with a grain of salt. Triggers have been notoriously unstable in earlier versions of D3NT and there have always been problems when trying to process data with triggers between the VME and FSI. I got tired years ago of trying to get these particular toys to play nice together so I simply don't use them unless requested. Same goes for indexes I'm sorry to say. And because I need to code for cross-platform apps, if I don't use triggers or indexes in NT that means I don't use them in *nix either. Shame cuz it's potentially very cool stuff. As with a lot of features, some of us swear by them and others swear at them. I'm hoping to check these things out in D3 7.5. Sorry I can't be more helpful. T sh <shamada (AT) prupipe (DOT) com> wrote: Thanks, Kevin Kevin Powick wrote: Why not just CALL your tracking subroutine from the appropriate applications that update this file? Often a file is updated by many processes, of which maybe only a few are important to track who did the update. Using a trigger means that all updates by all processes will get logged. Turns out the thing that I'm tracking can mainly be done by procs and manually at TCL. I'd like to catch it wherever it happens, that's why CALLX is the best solution. Also, instead of using an old-style user exit, try the @ fuctions. @user, @account, @pib. That was a good idea. I tried it, but it returned null. Sholom |
#10
| |||
| |||
|
|
I found an alternate way to clear the cache (in fact, I've found that logging off doesn't always clear the cache - at least not in D3/NT). After compiling, edit the DICT which has the CALLX, and just do an FI on it. This seems to force the system to update things. |
![]() |
| Thread Tools | |
| Display Modes | |
| |