Kbase P149684: 4GL/ABL: How to programmatically set permissions of compiled r-code under UNIX?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/07/2009 |
|
Status: Unverified
GOAL:
4GL/ABL: How to programmatically set permissions of compiled r-code under UNIX?
GOAL:
How to compile a set of procedures and set their permissions using 4GL/ABL on UNIX platforms?
GOAL:
How to execute the the UNIX chmod command from a 4GL/ABL procedure?
FACT(s) (Environment):
UNIX
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
To set the permissions of any UNIX file, use the 4GL/ABL OS-COMMAND statement to execute the UNIX chmod command. For example, the following snippet compiles a 4GL/ABL procedure named myProcedure.p and sets the permissions of its generated r-code procedure, myProcedure.r to 777 to allow everyone to read, write, and execute the file:
DEFINE VARIABLE cProcName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cRcodeName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cCommandLine AS CHARACTER NO-UNDO.
ASSIGN
cProcName = "myProcedure.p"
cRcodeName = REPLACE(cProcName, ".p", ".r")
cCommandLine = "chmod 777 " + cRcodeName.
OS-COMMAND SILENT VALUE(cCommandLine).