RE: [U2] Capturing hold file numbers.
We have used code like the following to capture a print job number within a program. The SETPTR command must be executed after the PRINTER ON and at least one line has been printed and before the PRINTER OFF/CLOSE statement. We are using UV 9.5.1.1E on an IBM RS6000 AIX system. PRINTER ON PRINT EXECUTE SETPTR, OUT PRINT.INFO PRINTER OFF PRINTER CLOSE PRINT.FILE.INFO = FIELD(PRINT.INFO,'/',2,4) PRINT.FILE.PATH.NAME = FIELD(PRINT.FILE.INFO,@AM,1) * Adjust the FIELD statement based on the spoolers path PRINT.JOB.NUMBER = FIELD(PRINT.FILE.PATH.NAME,'/',4,1)[3,5] CRT PRINT.JOB.NUMBER Running the program produces the following output: Spooler Entry #16719 16719 Hope this helps, Marc Mergenthaler HMS Healthcare Greenwood Village, CO 80111 [EMAIL PROTECTED] 303-504-5408 Office --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] [UV] To Limit TCL Access Privilege
On UniVerse you can use the Remote Command Entry to provide security on verbs, procs, paragraphs, etc. Copy the verbs you wish to protect into a file such as the VOCLIB file. Then create a remote command entry in the VOC. The remote command has a structure of: ID = name of the command (i.e. ED) 1 R 2 filename where verb is stored (i.e. VOCLIB) 3 record.id in VOCLIB (ED) 4 name of security subroutine (VOC.SECURITY) The command processor will check the will check the flag returned by the security subroutine. The security subroutine must have the following syntax for the SUBROUTINE statement: SUBROUTINE COMMAND.SECURITY( remote, sentence, level, port, account, username, flag) Example subroutine: SUBROUTINE VOC.SECURITY(COMMAND.REC, E.SENTENCE, LEVEL, PORT.NUM, USR.ACCT, USR.NAME, VERB.ACCESS.FLAG) COMMAND.LINE = TRIM(E.SENTENCE); * tcl command issued * no access to verb is assumed VERB.ACCESS.FLAG = @FALSE VERB = COMMAND.REC3 ; * verb being executed * get verb security record VERB.SEC.REC = TRANS('SECURITY',VERB,-1,'N') VERB.SEC.REC = RAISE(VERB.SEC.REC) USERS.ALLOWED = VERB.SEC.REC1 * security sub-routine to run SUB.CHECKS = VERB.SEC.REC2 * restrictions to be applied RESTRICTIONS = VERB.SEC.REC3 GOSUB CHECK.USER.ACCESS RETURN ; * to calling routine * Subroutines CHECK.USER.ACCESS: * Determine if the user has access to this verb. LOCATE @LOGNAME IN USERS.ALLOWED1,1 SETTING POS THEN VERB.ACCESS.FLAG = @TRUE; * allow access to verb END RETURN You should be able to find more information in the UniVerse System Description manual. Regards, Marc Mergenthaler --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Re: U2 Users Digest V1 #828
My email address has changed to [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Re: U2 Users Digest V1 #829
My email address has changed to [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Re: U2 Users Digest V1 #827
My email address has changed to [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Re: U2 Users Digest V1 #826
My email address has changed to [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/