亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 11984 | 回復(fù): 7
打印 上一主題 下一主題

CL 中的MONMSG [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2013-09-18 12:15 |只看該作者 |倒序?yàn)g覽
請(qǐng)問(wèn)RPG中,有這樣的語(yǔ)句:
MONMSG MSGID(CPF0000)
MONMSG MSGID(CPF1234)
等是什么意思呢?

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2013-09-18 14:42 |只看該作者
The Monitor Message (MONMSG) command is used to monitor escape,     
notify, and status messages sent to the program message queue of the
program in which the command is used.  Completion and diagnostic   
messages cannot be monitored.                                       
                                                                    
When the MONMSG command is compiled in a control language (CL)      
program, it establishes a monitor for the arrival of the specified  
messages.  The command monitors the messages for the condition      
specified by the comparison data given in the command.  If a message
meeting the conditions arrives on the message queue, the CL command
specified on the MONMSG command is processed.                       
                                                                    
Up to 1000 MONMSG commands can be specified in a program to monitor
the arrival of messages for specific conditions or for a group of   
conditions.  Specific message identifiers or generic message        
identifiers can be monitored.                                       
                                                                    
The MONMSG command can be coded following most commands in a CL     
program or ILE CL procedure.  A MONMSG command that is not placed at
the beginning of the program applies only to the immediately        
preceding command; this is called a command-level MONMSG command.   
The command-level MONMSG command monitors only messages sent by the
previous command.  If the message sent by that command meets the   
conditions specified in the MONMSG command, the action specified in
the same MONMSG command is taken.  As many as 100 MONMSG commands,  
coded immediately after a command, can monitor the messages sent by
that command.                                                      
                                                                    
When the action specified in the MONMSG command has been performed,
and that action does not end with a GOTO or RETURN command, control
returns to the command in the program that follows the command that
sent the message.  If the action ends with a GOTO command, control  
branches to the command in the program specified in the GOTO        
command.  If the action ends with a RETURN command, control returns
to the program that called the program that contains the MONMSG     
command.                                                            
                                                                    
If one or more MONMSG commands are placed at the beginning of the   
program, immediately following the declare commands or the PGM      
command if there are no declare commands, they monitor messages sent
by all of the commands in the program (maximum of 100).  This is   
called a program-level MONMSG command.  If any message sent by any  
command in the program meets the conditions specified in any one of
the program-level MONMSG commands, the corresponding action         
specified in the same command is taken.                             
The action taken by a command-level MONMSG command overrides a      
program-level MONMSG command.                                       
                                                                    
If a command is coded for the EXEC parameter on a MONMSG command   
that is placed at the beginning of a program, only the GOTO command
can be used, and it must specify the label for the command to which
control is to be passed if a monitored message occurs.  The label   
specified on a program-level MONMSG command cannot be a label      
associated with a subroutine.  If a GOTO command is performed for a
program-level MONMSG, the subroutine stack will be reset by the next
Call Subroutine (CALLSUBR) command.                                 
                                                                    
If a command is not coded for the EXEC parameter, monitored messages
are ignored.                                                        
Restrictions:                                                      
o  This command is valid only in a CL program or ILE CL procedure.
o  It can be coded after the last declare command (if declare      
    commands are used), following the PGM command that begins the   
    program, or it can be coded following any command allowed in a  
    CL program or ILE CL procedure, except for the following:  DO,  
    DOWHILE, DOUNTIL, DOFOR, ELSE, ENDDO, SELECT, WHEN, OTHERWISE,  
    ENDSELECT, ENDPGM, CALLSUBR, SUBR, RTNSUBR, ENDSUBR, GOTO, IF,  
    or RETURN.  Note that if another program sends a message that is
    monitored by this command, a return cannot be made to that      
    program.                                                        
                                                                    
Examples for MONMSG                                                      
                                                                          
    Example 1: Monitoring Messages Sent by Any Command                    
                                                                          
        PGM                                                               
        MONMSG   MSGID(CPF0001  CPF1999)  EXEC(GOTO  EXIT2)               
                                                                          
    This example shows a MONMSG command at the beginning of a CL         
    procedure that monitors for messages CPF0001 and CPF1999; these      
    messages might be sent by any command processed later in the         
    procedure. When either message is received from any of the commands   
    running in the procedure, control branches to the command identified  
    by the label EXIT2.                                                   
                                                                          
    CPF0001 states that an error was found in the command that is         
identified in the message itself. CPF1999, which can be sent by many
of the debugging commands (like CHGPGMVAR), states that errors      
occurred on the command, but it does not identify the command in the
message.                                                            
                                                                     
Example 2: Monitoring Messages Sent by a Single Command              
                                                                     
    CHGVAR   VAR(&A)  VALUE(&A / &B)                                 
    MONMSG   MSGID(MCH1211)  EXEC(CHGVAR  VAR(&A)  VALUE(1))         
                                                                     
In this example, the MONMSG command follows a Change Variable        
(CHGVAR) command and, therefore, is only monitoring messages sent by
the CHGVAR command. Escape message MCH1211 is sent to this program's
message queue when a division by zero is attempted.  Because         
MSGID(MCH1211) is specified, the MONMSG command is monitoring for   
this condition; when it receives the message, the second CHGVAR   
command is processed. In this command, the variable &A is set to a
value of 1.                                                        

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2013-09-18 15:32 |只看該作者
回復(fù) 2# shibuya_cu


謝謝回復(fù),這個(gè)描述文檔可以在哪里找到的?
   

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2013-09-18 18:32 |只看該作者
Enter MONMSG
F4 -》 F1

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2013-09-18 21:05 |只看該作者
shibuya_cu 發(fā)表于 2013-09-18 14:42
The Monitor Message (MONMSG) command is used to monitor escape,     
notify, and status messages se ...


CPF0001  CPF1999 這些值的定義和含義可以在哪來(lái)查到,可以自己定義嗎?

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2013-09-20 14:36 |只看該作者
WRKMSGD CPFxxxx, 可以自定義MSGID

回復(fù) 5# softiger


   

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2013-09-21 16:25 |只看該作者
shibuya_cu 發(fā)表于 2013-09-20 14:36
WRKMSGD CPFxxxx, 可以自定義MSGID

回復(fù) 5# softiger


通過(guò)WRKMSGD 定義了MSGID后,自己開(kāi)發(fā)的RPG,CL,C 等程序,可以發(fā)出這個(gè)這指定MSGID的錯(cuò)誤嗎?

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2013-09-22 21:36 |只看該作者
請(qǐng)參考我寫(xiě)的《 OS400下,CLP或RPGLE中的出錯(cuò)處理機(jī)制》,
http://blog.chinaunix.net/uid-20328593-id-3530258.html
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專(zhuān)區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP