Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Example

&pagelevel(4)&pagelevel

In the TEST.MSG procedure the MSGMAKER routine first creates a message fileand a message unit is entered. Messages from the message file SYSMES.MSG.010 are copied to the new message file and modified. The contents of the newly created and subsequently modified message file SYSMES.TSTFILE are output to a SYSOUT file and a SYSLST file. You will find an example of the SYSOUT log after the description of the individual procedure steps.

TEST.MSG procedure

/BEGIN-PROCEDURE
/ASSIGN-SYSLST TO=TEST.MSG.SYSLST
/ASSIGN-SYSOUT TO=TEST.MSG.SYSOUT
/ASSIGN-SYSDTA *SYSCMD
/REMARK *********************************************************************
/REMARK ** Part 1 : Create a new message file
/REMARK *********************************************************************
/START-MSGMAKER ——————————————————————————————————————————————————————— (1)
//REMARK
//REMARK ************************* OPEN-MSG-FILE ***************************
//REMARK
//OPEN-MSG-FILE FILE-NAME=SYSMES.TSTFILE,-
// MODE=CREATE(TYPE=C,PRODUCT=TSTPROD(VERSION=V01.0A10)) —— (2)
//REMARK
//REMARK ************************* ADD-MSG **********************************
//REMARK
//ADD-MSG MSG-ID=TST0000,- ——————————————————————————————————————————— (3)
// ACCESS-METHODS=ISAM,-
// DESTINATIONS=CONSOLE(ROUTING-CODE=A),-
// WEIGHT=30,-
// LANGUAGES=(E(-
// MSG-TEXT='Text in english with inserts ''(&&00)'' and ''(&&01)''',-
// MEANING=('First meaning line',-
// 'second meaning line'),-
// RESPONSE='Response line'-
// ),-
// D(-
// MSG-TEXT='Text in Deutsch mit Inserts ''(&&01)'' und ''(&&00)''',-
// MEANING=('Erste Bedeutungszeile',-
// 'Zweite Bedeutungszeile'),-
// RESPONSE=('Erste Massnahmeszeile',-
// 'Zweite Massnahmeszeile')-
// )-
// ),-
// INSERT-ATTRIBUTES=(0(NAME=NAM0,DEFAULT-VALUE='default0'),-
// 1(NAME=NAM1,DEFAULT-VALUE='default1'))
//REMARK
//REMARK ************************* SHOW *************************************
//REMARK
//SHOW MSG-ID=*ALL,OUTPUT=*ALL ———————————————————————————————————————— (4)
//END
/REMARK *********************************************************************
/REMARK ** Part 2 : Messages from another message file
/REMARK *********************************************************************
/REMARK
/START-MSGMAKER ——————————————————————————————————————————————————————— (5)
//REMARK
//REMARK ************************* SHOW (other file) ************************
//REMARK
//SHOW MSG-ID=(PEP0001,PEP0002,PEP0004),- ————————————————————————————— (6)
// INFORMATION=(MESSAGES(LANGUAGES=E,ELEMENTS=(MSG-TEXT,MEAN-RESP)),-
// DOCUMENTATION),-
// FROM-FILE=SYSMES.MSG.010,-
// OUTPUT=*ALL
//REMARK
//REMARK ************************* OPEN-MSG-FILE ****************************
//REMARK
//OPEN-MSG-FILE SYSMES.TSTFILE,(PRODUCT=*UNCHANGED('V01.1A10')) —————— (7)
//REMARK
//REMARK ***** COPY (from the other file) ***********************************
//REMARK
//COPY MSG-ID=(PEP0001,PEP0002,PEP0004),- ———————————————————————————— (8)
// INFORMATION=*ALL,-
// FROM-FILE=SYSES.MSG.010
//REMARK
//REMARK ************************* ADD-MSG **********************************
//REMARK
//ADD-MSG MSG-ID=PEP0005,- ———————————————————————————————————————————— (9)
// LANGUAGES=(E(-
// MSG-TEXT='File ''(&&05)'' does not exist',-
// ),-
// D(-
// MSG-TEXT='Datei ''(&&05)'' nicht vorhanden',-
// )-
// )
//REMARK
//REMARK ************************* MODIFY-MSG *******************************
//REMARK
//REMARK +++++ Modify the message attributes +++++
//REMARK
//MODIFY-MSG MSG-ID=(PEP0001,PEP0002),- ——————————————————————————————— (10)
// ACCESS-METHODS=DLAM,-
// DESTINATIONS=(USER-TASK,-
// CONSOLE(ROUTING-CODE=*MAIN-CONSOLE)),-
// INSERT-ATTRIBUTES=1(DEFAULT-VALUE= 'E')
//REMARK
//REMARK +++++ Modify the texts +++++
//REMARK
//MODIFY-MSG - ——————————————————————————————————————————————————————— (11)
// MSG-ID=PEP0001,-
// LANG=E(-
// MEANING=(-
// *REPLACE(-
// LINE-NUMBER=1,-
// TEXT='For more detailed information about the DMS error code-
// enter /HELP-MSG in'),-
// *ADD('system mode or see the BS2000 manual ''System-
// Messages''.')-
// )-
// )
//REMARK
//REMARK ************************* MOVE (rename a message) ******************
//REMARK
//MOVE MSG-ID=PEP0004,- ——————————————————————————————————————————————— (12)
// INFORMATION=(MESSAGES(LANGUAGES=E)),-
// TO-MSG-ID=TST*,-
// OVERWRITE=NO
//REMARK
//REMARK ************************* SHOW (new message file) ******************
//REMARK
//SHOW MSG-ID=(*CLASS(PEP),- —————————————————————————————————————————— (13)
// TST0004),-
// INFORMATION=(MESSAGES,DOCUMENTATION),-
// OUTPUT=*ALL
//REMARK
//REMARK ************************* DELETE-MSG *******************************
//REMARK
//DELETE-MSG MSG-ID=*CLASS(TST),LANGUAGES=(D,E) —————————————————————— (14)
//END
/END-PROCEDURE

Explanation

  1. MSGMAKER is called.

  2. Message file SYSMES.TSTFILE is opened for the TSTPROD product with version V01.0A10.

  3. A message with message code TST0000 is entered in the newly opened message. Apart from message attributes (access method, output target, weight code), the message, meaning and response texts are entered in English and German. The message texts contain inserts (&00) and (&01). If the inserts are to be enclosed in single quotes for the message output, double quotes must be input in the statement. Please note also that the ampersand character (&) is written twice.

  4. The contents of the SYSMES.TSTFILE message file are output to SYSOUT and SYSLST.

  5. MSGMAKER is called again.

  6. Three messages from the message file SYSMES.MSG.010 are output to SYSOUT and SYSLST. The output includes the English message, meaning and response texts, as well as the documentation lines.

  7. The message file SYSMES.TSTFILE is opened again, this time with a different version specification (V01.1A10).

  8. Three messages, including documentation, are copied from the message file SYSMES.MSG.010 to the SYSMES.TSTFILE file.

  9. The new message PEP0005 is entered in the SYSMES.TSTFILE message file.

  10. The access method, the output destination and the default text for insert (&01) are modified for the two messages PEP0001 and PEP0002.

  11. The English meaning text is modified for message PEP0001. The first line is replacedby a new text and a second line is added.

  12. All the English texts of message PEP0004 are stored under message code TST0004.

  13. The messages of message class MSM and message TST0004 are output to SYSOUT and SYSLST.

  14. The English and German texts of message TST0004 are deleted.

 

Output to SYSOUT

ad (4):

############################################################################
###################   M e s s a g e   c l a s s :   T S T   ################
############################################################################
-- TST0000 -----------------------------------------------------------------
Access     : ISAM
Destination: CONSOLE              Routing code: A                 Weight: 30
Warranty   : NO                   Text format : UPPER CASE
Insert attributes:
(&00)  Name: NAM0
       Default value: 'default0'
(&01)  Name: NAM1
       Default value: 'default1'
D   Text in Deutsch mit Inserts '(&01)' und '(&00)'
  ? Erste Bedeutungszeile
    Zweite Bedeutungszeile
  ! Erste Massnahmezeile
    Zweite Massnahmezeile
E   Text in english with inserts '(&00)' and '(&01)'
  ? First meaning line
    second meaning line
  ! Response line
%  MSMN600 MSGMAKER TERMINATED NORMALLY

ad (6):

############################################################################
###################   M e s s a g e   c l a s s :   P E P   ################
############################################################################
-- PEP0001 -----------------------------------------------------------------
E   MESSAGE WITH INSERT (&01)
  ? meaning for pep0001
  ! response for pep0001
-- PEP0002 -----------------------------------------------------------------
E   MESSAGE WITH INSERT (&01)
  ? meaning for pep0002
  ! response for pep0002
-- PEP0004 -----------------------------------------------------------------
E   MESSAGE WITH INSERT (&01)
  ? meaning for pep0004
  ! response for pep0004
========================   D O C U M E N T A T I O N   =====================
PE0001-PEP0004     Owner name: MAIER                   Team: TEAM1
                   product = DMS-ERR

 

ad (13):

############################################################################
###################   M e s s a g e   c l a s s :   P E P   ################
############################################################################
-- PEP0001 -----------------------------------------------------------------
Access     : DLAM
Destination: USER-TASK, CONSOLE  Routing code: * (main console)   Weight: 99
Warranty   : NO                  Text format : UPPER CASE
Insert attributes:
(&01)  Default value: 'E'
E   MESSAGE WITH INSERT (&01)
  ? For more detailed information about the DMS error code enter /HELP-MSG
    in system mode or see the BS2000 manual 'System Messages'.
  ! response for pep0001
-- PEP0002 -----------------------------------------------------------------
Access     : DLAM
Destination: USER-TASK, CONSOLE   Routing code: * (main console)  Weight: 99
Warranty   : NO                   Text format : UPPER CASE
Insert attributes:
(&01)  Default value: 'E'
E   MESSAGE WITH INSERT (&01)
  ? meaning for pep0002
  ! response for pep0002
-- PEP0005 -----------------------------------------------------------------
Access     : ISAM
Destination: USER-TASK           Routing code:                    Weight: 99
Warranty   : NO                  Text format : UPPER CASE
D   Datei '(&05)' nicht vorhanden
E   File '(&05)' does not exist
========================   D O C U M E N T A T I O N   =====================
PEP0001-PEP0004    Owner name: MAIER                   Team: TEAM1
                  product = DMS-ERR
############################################################################
###################   M e s s a g e   c l a s s :   T S T   ################
############################################################################
-- TST0004 -----------------------------------------------------------------
Access     : ISAM
Destination: USER-TASK            Routing code:                   Weight: 99
Warranty   : NO                   Text format : UPPER CASE
E   MESSAGE WITH INSERT (&01)
  ? meaning for pep0004
  ! response for pep0004

Output to SYSLST

Output of the contents of the message file to SYSLST is almost the same as the output to SYSOUT.

Output of the messages and documentation lines is identical. Column 1 of the SYSLST log is, however, reserved for EBCDIC control characters to enable the output to be sent to a printer. The new page is headed by an information line containing the date, time, product name, product version and page number.