Kbase P111040: 4GL/ABL: how to access the RCODE-INFO System Handle attributes for compiled procedures?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  01/12/2008 |
|
Status: Verified
GOAL:
4GL/ABL: how to access the RCODE-INFO System Handle attributes for compiled procedures?
GOAL:
How to compare the RCODE-INFO of two compiled 4GL procedures?
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
FIX:
The following procedure demonstrate how to access and compare the RCODE-INFO System Handle attributes of two compiled (.r) 4GL/ABL procedures:
DEFINE VARIABLE cFirstRcodeFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cSecondRcodeFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFirstRcodeAttributeList AS CHARACTER EXTENT 12 NO-UNDO.
DEFINE VARIABLE cSecondRcodeAttributeList AS CHARACTER EXTENT 12 NO-UNDO.
ASSIGN
cFirstRcodeFileName = "FirstRcodeFileName.r"
cSecondRcodeFileName = "SecondRcodeFileName.r".
RUN getRcodeAttributes(
INPUT cFirstRcodeFileName,
INPUT-OUTPUT cFirstRcodeAttributeList
).
RUN getRcodeAttributes(
INPUT cSecondRcodeFileName,
INPUT-OUTPUT cSecondRcodeAttributeList
).
MESSAGE
"Attribute:" "~t~t" "First" "~t~t~t" "First RCODE-INFO" "~n"
"CODEPAGE:" "~t" cFirstRcodeAttributeList[1] "~t~t" cSecondRcodeAttributeList[1] "~n"
"CRC-VALUE:" "~t" cFirstRcodeAttributeList[2] "~t~t~t" cSecondRcodeAttributeList[2] "~n"
"DB-REFS:" "~t" cFirstRcodeAttributeList[3] "~t~t" cSecondRcodeAttributeList[3] "~n"
"FILE-NAME:" "~t" cFirstRcodeAttributeList[4] "~t" cSecondRcodeAttributeList[4] "~n"
"HANDLE:" "~t" cFirstRcodeAttributeList[5] "~t~t~t" cSecondRcodeAttributeList[5] "~n"
"INST-PROC:" "~t" cFirstRcodeAttributeList[6] "~t~t~t" cSecondRcodeAttributeList[6] "~n"
"IS-CLASS:" "~t" cFirstRcodeAttributeList[7] "~t~t~t" cSecondRcodeAttributeList[7] "~n"
"LANGUAGES:" "~t" cFirstRcodeAttributeList[8] "~t~t" cSecondRcodeAttributeList[8] "~n"
"MD5:" "~t" cFirstRcodeAttributeList[9] "~t~t" cSecondRcodeAttributeList[9] "~n"
"TBL-CRCS:" "~t" cFirstRcodeAttributeList[10] "~t~t" cSecondRcodeAttributeList[10] "~n"
"TABLES:" "~t" cFirstRcodeAttributeList[11] "~t~t" cSecondRcodeAttributeList[11] "~n"
"TYPE:" "~t~t" cFirstRcodeAttributeList[12] "~t" cSecondRcodeAttributeList[12]
VIEW-AS ALERT-BOX INFO BUTTONS OK.
PROCEDURE getRcodeAttributes:
DEFINE INPUT PARAMETER ipcRcodeFileName AS CHARACTER NO-UNDO.
DEFINE INPUT-OUTPUT PARAMETER ipcAttributeList AS CHARACTER EXTENT 12.
ASSIGN
RCODE-INFO:FILE-NAME = ipcRcodeFileName
ipcAttributeList[1] = TRIM(RCODE-INFO:CODEPAGE)
ipcAttributeList[2] = STRING(RCODE-INFO:CRC-VALUE)
ipcAttributeList[3] = TRIM(RCODE-INFO:DB-REFERENCES)
ipcAttributeList[4] = TRIM(RCODE-INFO:FILE-NAME)
ipcAttributeList[5] = STRING(RCODE-INFO:HANDLE)
ipcAttributeList[6] = STRING(RCODE-INFO:INSTANTIATING-PROCEDURE)
ipcAttributeList[7] = STRING(RCODE-INFO:IS-CLASS)
ipcAttributeList[8] = TRIM(RCODE-INFO:LANGUAGES)
ipcAttributeList[9] = TRIM(RCODE-INFO:MD5-VALUE)
 .; ipcAttributeList[10] = TRIM(RCODE-INFO:TABLE-CRC-LIST)
ipcAttributeList[11] = TRIM(RCODE-INFO:TABLE-LIST)
ipcAttributeList[12] = TRIM(RCODE-INFO:TYPE).
END PROCEDURE..