[U2] Triggers AND Q Pointers....
ok. not sure what is happeneing, except the trigger fails. It has been working great when changes are made from the same account, But if I attempt to make a change from another account that uses a q ponter to that file, the trigger fails. I'm guessing, that it's because you need a filename and location, so I gave the complete filename in the VOC entry in the other account for NABTP and NABTP F /unix/location/NABTP /unix/location/D_NABTP I can view the data, but If I change the data (activating the trigger) I get: : FI Program ED: pc = 726C, Trigger program *TRIGGER_EMAIL did not complete. Program ED: pc = 726C, Error performing trigger for /data2/CBS-BLUE/NABTP. Failed to file 000247 in file NABTP. STATUS = -1 This is on UV 10 / unix George Gallen Senior Programmer/Analyst Accounting/Data Division, EDI Administrator ggal...@wyanokegroup.com ph:856.848.9005 Ext 220 The Wyanoke Group http://www.wyanokegroup.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Triggers AND Q Pointers....[solved]
never mind...it turned out the trigger called a subroutine, which opened a file, which wasn't defined in the other account Once I created a Q pointer for that file, the trigger ran fine. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, August 20, 2009 3:48 PM To: U2 Users List Subject: [U2] Triggers AND Q Pointers ok. not sure what is happeneing, except the trigger fails. It has been working great when changes are made from the same account, But if I attempt to make a change from another account that uses a q ponter to that file, the trigger fails. I'm guessing, that it's because you need a filename and location, so I gave the complete filename in the VOC entry in the other account for NABTP and NABTP F /unix/location/NABTP /unix/location/D_NABTP I can view the data, but If I change the data (activating the trigger) I get: : FI Program ED: pc = 726C, Trigger program *TRIGGER_EMAIL did not complete. Program ED: pc = 726C, Error performing trigger for /data2/CBS- BLUE/NABTP. Failed to file 000247 in file NABTP. STATUS = -1 This is on UV 10 / unix George Gallen Senior Programmer/Analyst Accounting/Data Division, EDI Administrator ggal...@wyanokegroup.com ph:856.848.9005 Ext 220 The Wyanoke Group http://www.wyanokegroup.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] U2 and UPS WorldShip
-Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brutzman, Bill Sent: Wednesday, August 19, 2009 7:37 AM To: U2 Users List Subject: [U2] U2 and UPS WorldShip The main thing we need with United Parcel Service is to get the 1Z... tracking number back into UniVerse. We have a UV type 19 file set as a Samba share, and the share is mounted as a drive letter on the UPS workstation. UPS wrote a script for us that exports tracking numbers into a CSV file on that drive after each shipment is processed. They also added an import function that runs against the same file to pull in the customer name and address when the shipping clerk scans a barcoded order #. A cron job runs on the UV server around every 5 minutes to add new orders to the CSV file, and extract tracking #'s for the prior orders. We do the same thing with Fedex. We've been doing this for the past 8 years, and it's been trouble free. The only time we have an issue is when UPS or Fedex force a shipping station software or hardware upgrade on us and they have to rewrite their scripts. -John ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] UD: Executing small part of subroutine code once from dictionary call
I have a UD dictionary that calls a subroutine. The subroutine selects a small file and saves the data into a reformatted array, which is returned as a passed variable. I want to only execute this select code once in the subroutine then continue with the reset of the subroutines business rule(s) for subsequent items processed. When I create a named common variable for the built data array the array is set once and when I alter the data in the selected file (small) it never is updated when I run a subsequent selects or sorts. UniData doesn't seem to be able to inform me when the first item is processed, in order to initialize, read, and build the configuration array. How is this done? E.g. I want to know what accounts a user has access to (we run an ASP with 50-100 accounts on it and our users file is global). The dictionary builds an array of users on our system as follows: 001 mv'd list of user names 002 mv'd list of upper-cased user names 003 mv'd list of account paths each user has access to A user can have access to multiple account paths. When I do the following (in PICK mode): :sort SECUSERS BY USERID ID-SUPP USERID ACCTUSER AUTHACCTS ...I get the following list of users and account paths they have access to: UserId. C. AuthAccts. PUBLICUSER 1 E:\UDAccounts\AsiPublic E:\DataTrust\Dev E:\DataTrust\Demo DOTNETUSER 1 E:\DataTrust\Demo E:\Advantos\Intel E:\DataTrust\Dev MYUSER 1 E:\DataTrust\Dev E:\DataTrust\Demo E:\Advantos\Intel The dictionary of AUTHACCTS looks like: Top of AUTHACCTS in DICT SECUSERS, 6 lines, 113 characters. *--: P 001: I The authorized accounts this user has access to (a DBIUSERS value) 002: SUBR( D.AUTHACCTS, @ID ) 003: 004: AuthAccts 005: 30L 006: M Bottom. *--: ...and the subroutine looks like: * ** Initialize common program variables $INCLUDE DTABP,INCLUDES SET.COMMON * ** Initialize local common COMMON /dbUserc/ comDbiUserArray * ** Initialize null because we're calling from a dictionary and SET.INIT ** hasn't run yet (besides NULL$ isn't named common). NULL$ = '' * ** Initialize return value OutValue = NULL$ * ** Make sure we're dealing with a user record key IF UserID = NULL$ THEN GOTO END.OF.PROGRAM * ** Get the list of DB users IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN CALL GET.DBIUSERS ( DbiUserArray ) comDbiUserArray = DbiUserArray END * **---** ** ** ** R U N P R O G R A M ** ** ** **---** * ** Assign the names Id intialize variable to pass back UCDbiUserList = comDbiUserArray2 DbiUserPaths = comDbiUserArray3 UserID= OCONV(UserID, 'MCU') LOCATE(UserID, UCDbiUserList, 1; Pos) THEN OutValue = RAISE(DbiUserPaths1,Pos) END The problem is once I run the query the contents of the array comDbiUserArray will never change until I log off. How can I force the array to be initialized without logging off? Any help would be appreciated. Thanks, Bill Haskett Advantos Systems, Inc. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UD: Executing small part of subroutine code once from dictionary call
Bill, Does Unidata have the @NI variable this will be set to 1 for the first record of any new LIST or SELECT so you should be able to change IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN To IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 OR @NI = 1 THEN HTH Andy - Original Message From: Bill Haskett wphask...@advantos.net To: U2 Mail List U2-users@listserver.u2ug.org Sent: Thursday, 20 August, 2009 22:28:44 Subject: [U2] UD: Executing small part of subroutine code once from dictionary call I have a UD dictionary that calls a subroutine. The subroutine selects a small file and saves the data into a reformatted array, which is returned as a passed variable. I want to only execute this select code once in the subroutine then continue with the reset of the subroutines business rule(s) for subsequent items processed. When I create a named common variable for the built data array the array is set once and when I alter the data in the selected file (small) it never is updated when I run a subsequent selects or sorts. UniData doesn't seem to be able to inform me when the first item is processed, in order to initialize, read, and build the configuration array. How is this done? E.g. I want to know what accounts a user has access to (we run an ASP with 50-100 accounts on it and our users file is global). The dictionary builds an array of users on our system as follows: 001 mv'd list of user names 002 mv'd list of upper-cased user names 003 mv'd list of account paths each user has access to A user can have access to multiple account paths. When I do the following (in PICK mode): :sort SECUSERS BY USERID ID-SUPP USERID ACCTUSER AUTHACCTS ...I get the following list of users and account paths they have access to: UserId. C.. AuthAccts. PUBLICUSER 1 E:\UDAccounts\AsiPublic E:\DataTrust\Dev E:\DataTrust\Demo DOTNETUSER 1 E:\DataTrust\Demo E:\Advantos\Intel E:\DataTrust\Dev MYUSER 1 E:\DataTrust\Dev E:\DataTrust\Demo E:\Advantos\Intel The dictionary of AUTHACCTS looks like: Top of AUTHACCTS in DICT SECUSERS, 6 lines, 113 characters. *--: P 001: I The authorized accounts this user has access to (a DBIUSERS value) 002: SUBR( D.AUTHACCTS, @ID ) 003: 004: AuthAccts 005: 30L 006: M Bottom. *--: ...and the subroutine looks like: * ** Initialize common program variables $INCLUDE DTABP,INCLUDES SET.COMMON * ** Initialize local common COMMON /dbUserc/ comDbiUserArray * ** Initialize null because we're calling from a dictionary and SET.INIT ** hasn't run yet (besides NULL$ isn't named common). NULL$ = '' * ** Initialize return value OutValue = NULL$ * ** Make sure we're dealing with a user record key IF UserID = NULL$ THEN GOTO END.OF.PROGRAM * ** Get the list of DB users IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN CALL GET.DBIUSERS ( DbiUserArray ) comDbiUserArray = DbiUserArray END * **---** ** ** ** R U N P R O G R A M ** ** ** **---** * ** Assign the names Id intialize variable to pass back UCDbiUserList = comDbiUserArray2 DbiUserPaths = comDbiUserArray3 UserID= OCONV(UserID, 'MCU') LOCATE(UserID, UCDbiUserList, 1; Pos) THEN OutValue = RAISE(DbiUserPaths1,Pos) END The problem is once I run the query the contents of the array comDbiUserArray will never change until I log off. How can I force the array to be initialized without logging off? Any help would be appreciated. Thanks, Bill Haskett Advantos Systems, Inc. ___ U2-Users mailing list u2-us...@listserver.u2ug..org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UD: Executing small part of subroutine code once from dictionary call
Bill, A little while ago there was a thread about running totals, and the same problem of initialization came up. It's apparently solved by using an additional named commons variable that saves the date and time last initialized compared to the current date and time of 'this' LIST/etc. statement. Here's a post that used that method: http://www.mail-archive.com/u2-users%40listserver.u2ug.org/msg30268.html Best Regards, Richard Lewis On Thu, Aug 20, 2009 at 3:28 PM, Bill Haskett wphask...@advantos.netwrote: I have a UD dictionary that calls a subroutine. The subroutine selects a small file and saves the data into a reformatted array, which is returned as a passed variable. I want to only execute this select code once in the subroutine then continue with the reset of the subroutines business rule(s) for subsequent items processed. When I create a named common variable for the built data array the array is set once and when I alter the data in the selected file (small) it never is updated when I run a subsequent selects or sorts. UniData doesn't seem to be able to inform me when the first item is processed, in order to initialize, read, and build the configuration array. How is this done? E.g. I want to know what accounts a user has access to (we run an ASP with 50-100 accounts on it and our users file is global). The dictionary builds an array of users on our system as follows: 001 mv'd list of user names 002 mv'd list of upper-cased user names 003 mv'd list of account paths each user has access to A user can have access to multiple account paths. When I do the following (in PICK mode): :sort SECUSERS BY USERID ID-SUPP USERID ACCTUSER AUTHACCTS ...I get the following list of users and account paths they have access to: UserId. C. AuthAccts. PUBLICUSER 1 E:\UDAccounts\AsiPublic E:\DataTrust\Dev E:\DataTrust\Demo DOTNETUSER 1 E:\DataTrust\Demo E:\Advantos\Intel E:\DataTrust\Dev MYUSER 1 E:\DataTrust\Dev E:\DataTrust\Demo E:\Advantos\Intel The dictionary of AUTHACCTS looks like: Top of AUTHACCTS in DICT SECUSERS, 6 lines, 113 characters. *--: P 001: I The authorized accounts this user has access to (a DBIUSERS value) 002: SUBR( D.AUTHACCTS, @ID ) 003: 004: AuthAccts 005: 30L 006: M Bottom. *--: ...and the subroutine looks like: * ** Initialize common program variables $INCLUDE DTABP,INCLUDES SET.COMMON * ** Initialize local common COMMON /dbUserc/ comDbiUserArray * ** Initialize null because we're calling from a dictionary and SET.INIT ** hasn't run yet (besides NULL$ isn't named common). NULL$ = '' * ** Initialize return value OutValue = NULL$ * ** Make sure we're dealing with a user record key IF UserID = NULL$ THEN GOTO END.OF.PROGRAM * ** Get the list of DB users IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN CALL GET.DBIUSERS ( DbiUserArray ) comDbiUserArray = DbiUserArray END * **---** ** ** ** R U N P R O G R A M ** ** ** **---** * ** Assign the names Id intialize variable to pass back UCDbiUserList = comDbiUserArray2 DbiUserPaths = comDbiUserArray3 UserID= OCONV(UserID, 'MCU') LOCATE(UserID, UCDbiUserList, 1; Pos) THEN OutValue = RAISE(DbiUserPaths1,Pos) END The problem is once I run the query the contents of the array comDbiUserArray will never change until I log off. How can I force the array to be initialized without logging off? Any help would be appreciated. Thanks, Bill Haskett Advantos Systems, Inc. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UD: Executing small part of subroutine code once from dictionary call
@NI = @RECCOUNT We are the Knights who say @NI, Monty Python Date: Thu, 20 Aug 2009 22:09:33 + From: andyb...@yahoo.co.uk To: u2-users@listserver.u2ug.org Subject: Re: [U2] UD: Executing small part of subroutine code once from dictionary call Bill, Does Unidata have the @NI variable this will be set to 1 for the first record of any new LIST or SELECT so you should be able to change IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN To IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 OR @NI = 1 THEN HTH Andy - Original Message From: Bill Haskett wphask...@advantos.net To: U2 Mail List U2-users@listserver.u2ug.org Sent: Thursday, 20 August, 2009 22:28:44 Subject: [U2] UD: Executing small part of subroutine code once from dictionary call I have a UD dictionary that calls a subroutine. The subroutine selects a small file and saves the data into a reformatted array, which is returned as a passed variable. I want to only execute this select code once in the subroutine then continue with the reset of the subroutines business rule(s) for subsequent items processed. When I create a named common variable for the built data array the array is set once and when I alter the data in the selected file (small) it never is updated when I run a subsequent selects or sorts. UniData doesn't seem to be able to inform me when the first item is processed, in order to initialize, read, and build the configuration array. How is this done? E.g. I want to know what accounts a user has access to (we run an ASP with 50-100 accounts on it and our users file is global). The dictionary builds an array of users on our system as follows: 001 mv'd list of user names 002 mv'd list of upper-cased user names 003 mv'd list of account paths each user has access to A user can have access to multiple account paths. When I do the following (in PICK mode): :sort SECUSERS BY USERID ID-SUPP USERID ACCTUSER AUTHACCTS ...I get the following list of users and account paths they have access to: UserId. C.. AuthAccts. PUBLICUSER 1 E:\UDAccounts\AsiPublic E:\DataTrust\Dev E:\DataTrust\Demo DOTNETUSER 1 E:\DataTrust\Demo E:\Advantos\Intel E:\DataTrust\Dev MYUSER 1 E:\DataTrust\Dev E:\DataTrust\Demo E:\Advantos\Intel The dictionary of AUTHACCTS looks like: Top of AUTHACCTS in DICT SECUSERS, 6 lines, 113 characters. *--: P 001: I The authorized accounts this user has access to (a DBIUSERS value) 002: SUBR( D.AUTHACCTS, @ID ) 003: 004: AuthAccts 005: 30L 006: M Bottom. *--: ...and the subroutine looks like: * ** Initialize common program variables $INCLUDE DTABP,INCLUDES SET.COMMON * ** Initialize local common COMMON /dbUserc/ comDbiUserArray * ** Initialize null because we're calling from a dictionary and SET.INIT ** hasn't run yet (besides NULL$ isn't named common). NULL$ = '' * ** Initialize return value OutValue = NULL$ * ** Make sure we're dealing with a user record key IF UserID = NULL$ THEN GOTO END.OF.PROGRAM * ** Get the list of DB users IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN CALL GET.DBIUSERS ( DbiUserArray ) comDbiUserArray = DbiUserArray END * **---** ** ** ** R U N P R O G R A M ** ** ** **---** * ** Assign the names Id intialize variable to pass back UCDbiUserList = comDbiUserArray2 DbiUserPaths = comDbiUserArray3 UserID = OCONV(UserID, 'MCU') LOCATE(UserID, UCDbiUserList, 1; Pos) THEN OutValue = RAISE(DbiUserPaths1,Pos) END The problem is once I run the query the contents of the array comDbiUserArray will never change until I log off. How can I force the array to be initialized without logging off? Any help would be appreciated. Thanks, Bill Haskett Advantos Systems, Inc. ___ U2-Users mailing list u2-us...@listserver.u2ug..org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _ Windows Live: Keep your friends up to date with what you do online. http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UD: Executing small part of subroutine code once from dictionary call
I used the @ITEM.COUNT to initialize, but had to be careful to perform a SSELECT before doing a LIST to avoid getting an out-of-order result. Date: Thu, 20 Aug 2009 16:10:02 -0600 From: rbl...@gmail.com To: u2-users@listserver.u2ug.org Subject: Re: [U2] UD: Executing small part of subroutine code once from dictionary call Bill, A little while ago there was a thread about running totals, and the same problem of initialization came up. It's apparently solved by using an additional named commons variable that saves the date and time last initialized compared to the current date and time of 'this' LIST/etc. statement. Here's a post that used that method: http://www.mail-archive.com/u2-users%40listserver.u2ug.org/msg30268.html Best Regards, Richard Lewis On Thu, Aug 20, 2009 at 3:28 PM, Bill Haskett wphask...@advantos.netwrote: I have a UD dictionary that calls a subroutine. The subroutine selects a small file and saves the data into a reformatted array, which is returned as a passed variable. I want to only execute this select code once in the subroutine then continue with the reset of the subroutines business rule(s) for subsequent items processed. When I create a named common variable for the built data array the array is set once and when I alter the data in the selected file (small) it never is updated when I run a subsequent selects or sorts. UniData doesn't seem to be able to inform me when the first item is processed, in order to initialize, read, and build the configuration array. How is this done? E.g. I want to know what accounts a user has access to (we run an ASP with 50-100 accounts on it and our users file is global). The dictionary builds an array of users on our system as follows: 001 mv'd list of user names 002 mv'd list of upper-cased user names 003 mv'd list of account paths each user has access to A user can have access to multiple account paths. When I do the following (in PICK mode): :sort SECUSERS BY USERID ID-SUPP USERID ACCTUSER AUTHACCTS ...I get the following list of users and account paths they have access to: UserId. C. AuthAccts. PUBLICUSER 1 E:\UDAccounts\AsiPublic E:\DataTrust\Dev E:\DataTrust\Demo DOTNETUSER 1 E:\DataTrust\Demo E:\Advantos\Intel E:\DataTrust\Dev MYUSER 1 E:\DataTrust\Dev E:\DataTrust\Demo E:\Advantos\Intel The dictionary of AUTHACCTS looks like: Top of AUTHACCTS in DICT SECUSERS, 6 lines, 113 characters. *--: P 001: I The authorized accounts this user has access to (a DBIUSERS value) 002: SUBR( D.AUTHACCTS, @ID ) 003: 004: AuthAccts 005: 30L 006: M Bottom. *--: ...and the subroutine looks like: * ** Initialize common program variables $INCLUDE DTABP,INCLUDES SET.COMMON * ** Initialize local common COMMON /dbUserc/ comDbiUserArray * ** Initialize null because we're calling from a dictionary and SET.INIT ** hasn't run yet (besides NULL$ isn't named common). NULL$ = '' * ** Initialize return value OutValue = NULL$ * ** Make sure we're dealing with a user record key IF UserID = NULL$ THEN GOTO END.OF.PROGRAM * ** Get the list of DB users IF comDbiUserArray = NULL$ OR comDbiUserArray = 0 THEN CALL GET.DBIUSERS ( DbiUserArray ) comDbiUserArray = DbiUserArray END * **---** ** ** ** R U N P R O G R A M ** ** ** **---** * ** Assign the names Id intialize variable to pass back UCDbiUserList = comDbiUserArray2 DbiUserPaths = comDbiUserArray3 UserID= OCONV(UserID, 'MCU') LOCATE(UserID, UCDbiUserList, 1; Pos) THEN OutValue = RAISE(DbiUserPaths1,Pos) END The problem is once I run the query the contents of the array comDbiUserArray will never change until I log off. How can I force the array to be initialized without logging off? Any help would be appreciated. Thanks, Bill Haskett Advantos Systems, Inc. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UD: Executing small part of subroutine code once from dictionary call
Bill Haskett wrote: I have a UD dictionary that calls a subroutine. The subroutine selects a small file and saves the data into a reformatted array, which is returned as a passed variable. I want to only execute this select code once in the subroutine then continue with the reset of the subroutines business rule(s) for subsequent items processed. When I create a named common variable for the built data array the array is set once and when I alter the For the named common variable, could you not just use something like: IF NOT(ASSIGNED(NAMED.VAR)) THEN GOSUB INIT.DATA Art ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users