Kbase P26072: How to get the value of the -h parameter using Progress 4GL?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/29/2003 |
|
Status: Unverified
GOAL:
How to get the value of the -h parameter using Progress 4GL?
GOAL:
How to find out what the maximum number of databases that can be connected during a single Progress session is through the 4GL?
FIX:
DEFINE VARIABLE vcCommandLine AS CHARACTER NO-UNDO.
DEFINE VARIABLE vcParameterStr AS CHARACTER NO-UNDO.
DEFINE VARIABLE ptrToString AS MEMPTR NO-UNDO.
PROCEDURE GetCommandLineA EXTERNAL "KERNEL32.DLL":U:
DEFINE RETURN PARAMETER ptrToString AS MEMPTR.
END PROCEDURE.
RUN GetCommandLineA (OUTPUT ptrToString).
ASSIGN vcCommandLine = GET-STRING(ptrToString,1).
IF LOOKUP("-pf":U,vcCommandLine,"":U) > 0 THEN
DO:
INPUT FROM VALUE(ENTRY(LOOKUP("-pf":U,vcCommandLine,"":U) + 1,vcCommandLine,"":U)).
REPEAT:
IMPORT UNFORMATTED vcParameterStr.
IF LOOKUP("-h":U,vcParameterStr,"":U) > 0 THEN
MESSAGE "Value of the '-h' parameter specified in the .pf file is: ":U
ENTRY(LOOKUP("-h":U,vcParameterStr,"":U) + 1,vcParameterStr,"":U)
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
END.
ELSE
IF LOOKUP("-h":U,vcCommandLine,"":U) > 0 THEN
MESSAGE "Value of the '-h' parameter specified in the command line is: ":U
ENTRY(LOOKUP("-h":U,vcCommandLine,"":U) + 1,vcCommandLine,"":U)
VIEW-AS ALERT-BOX INFO BUTTONS OK.