home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
viscobv6.zip
/
vac22os2
/
ibmcobol
/
samples
/
minivb
/
msgbox
/
msgbox.cbv
next >
Wrap
Text File
|
1998-02-24
|
3KB
|
86 lines
* Feature source code generation begins here...
* METHOD
IDENTIFICATION DIVISION.
METHOD-ID. "getMgsTitle".
DATA DIVISION.
LOCAL-STORAGE SECTION.
LINKAGE SECTION.
01 MgsTitle.
03 MgsTitle-Length PIC 9(9) COMP-5.
03 MgsTitle-String.
05 MgsTitle-Chars PIC X
OCCURS 1 TO 255 TIMES
DEPENDING ON MgsTitle-Length.
01 rc PIC S9(9) USAGE COMP-5.
PROCEDURE DIVISION
RETURNING MgsTitle.
MOVE iMgsTitle-Length TO MgsTitle-length.
MOVE iMgsTitle-String TO MgsTitle-string.
GOBACK.
END METHOD "getMgsTitle".
* METHOD
IDENTIFICATION DIVISION.
METHOD-ID. "setMgsTitle".
DATA DIVISION.
LOCAL-STORAGE SECTION.
01 aMsgBox USAGE OBJECT REFERENCE MsgBox.
01 event USAGE OBJECT REFERENCE CNotificationEvent.
01 MgsTitleId USAGE POINTER.
LINKAGE SECTION.
01 MgsTitle.
03 MgsTitle-Length PIC 9(9) COMP-5.
03 MgsTitle-String.
05 MgsTitle-Chars PIC X
OCCURS 1 TO 255 TIMES
DEPENDING ON MgsTitle-Length.
01 rc PIC S9(9) USAGE COMP-5.
PROCEDURE DIVISION USING MgsTitle.
MOVE MgsTitle-Length TO iMgsTitle-length.
MOVE MgsTitle-String TO iMgsTitle-string.
INVOKE CNotificationEvent "somNew" returning event.
SET aMsgBox TO SELF.
INVOKE SELF "getMgsTitleId"
RETURNING MgsTitleId.
INVOKE event "initializeNotificationEvent" USING
by value MgsTitleId by value aMsgBox.
INVOKE SELF "notifyObservers" using by value event.
INVOKE event "somFree".
GOBACK.
END METHOD "setMgsTitle".
* METHOD
IDENTIFICATION DIVISION.
METHOD-ID. "msgText".
DATA DIVISION.
LOCAL-STORAGE SECTION.
01 MsgTable.
05 AMessage PIC X(35)
occurs 5 times.
LINKAGE SECTION.
01 MType PIC 9(9) COMP-5.
01 Mtext.
03 Mtext-Length PIC 9(9) COMP-5.
03 Mtext-String.
05 Mtext-Chars PIC X
OCCURS 1 TO 255 TIMES
DEPENDING ON Mtext-Length.
PROCEDURE DIVISION USING MType
RETURNING Mtext.
Move "This is the first message text." to AMessage(1).
Move "This is the another message text." to AMessage(2).
Move "This is the critical message text." to AMessage(3).
Move 35 to Mtext-Length.
Move AMessage(MType) to Mtext-String.
GOBACK.
END METHOD "msgText".
* Feature source code generation ends here.