我尝试使用
显示IBM MQ频道https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q086040_.htm
我定义了一个名为MYMQ.SVRCONN
的频道,但这会给我一个语法错误:
runmqsc
DISPLAY CHANNEL MYMQ.SVRCONN
5 : DISPLAY CHANNEL MYMQ.SVRCONN
AMQ8405:在命令段末尾或附近检测到语法错误: - 显示频道
我遇到同样的问题:
DISPLAY CHANNEL *
有什么建议吗?
我很难理解这种语法:
>>-DISPLAY CHANNEL--(--generic-channel-name--)------------------>
如果您可以解释语法的工作方式,那么可以获得奖励积分。
答案 0 :(得分:2)
)
和DISPLAY CHANNEL(MYMQ.SVRCONN)
是所需语法的一部分。
在示例中,您提供的命令应为:
DISPLAY CHANNEL(*)
或
<command> <object type>(<object name>) [optional parameters]
大多数MQSC命令具有类似的语法:
DEFINE CHL(MYMQ.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('xyzuser')
一些例子:
ALTER CHL(MYMQ.SVRCONN) CHLTYPE(SVRCONN) DESCR('Test channel')
DISPLAY CHL(MYMQ.SVRCONN) MCAUSER
QMGR
DIS QMGR CHLAUTH CONNAUTH
对象是对象类型之后不需要跟随对象名称的异常之一,因为当您运行这些命令时,您将连接到特定的队列管理器:
ALTER QMGR CHLAUTH(ENABLED)
'
有几点需要注意:
DISPLAY
字符中的内容折叠为UPPER大小写。ALL
命令仅显示对象上所有参数的子集。您可以使用特殊参数DISPLAY
让它显示所有参数,或者您可以指定要显示的特定参数。WHERE
命令也可以使用DIS CHL(*) WHERE(MCAUSER eq 'xyzuser') DESCR
子句,例如: if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'PLUGIN_NAME_VERSION', '1.0.0' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-post-time-changer-activator.php
*/
function activate_post_time_changer() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-post-time-changer-activator.php';
Post_Time_Changer_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-post-time-changer-deactivator.php
*/
function deactivate_post_time_changer() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-post-time-changer-deactivator.php';
Post_Time_Changer_Deactivator::deactivate();
}
register_activation_hook( __FILE__, 'activate_post_time_changer' );
register_deactivation_hook( __FILE__, 'deactivate_post_time_changer' );
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
require plugin_dir_path( __FILE__ ) . 'includes/class-post-time-changer.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function run_post_time_changer() {
$plugin = new Post_Time_Changer();
$plugin->run();
}
run_post_time_changer();
add_action('admin_menu', 'PTC_setup_menu');
function PTC_setup_menu(){
add_menu_page( 'Post Time Changer', 'PostTimeChanger', 'manage_options', 'post-time-changer', 'ptc_option_page' );
}
function ptc_option_page(){
?>
<div class="wrap">
<h1>Post Time Changer</h1>
<form action="options.php" method="post">
<?php settings_fields('plugin_options'); ?>
<?php do_settings_sections('plugin'); ?>
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" /><br/>
<!-- amount of time the post should be anticipated -->
set the amount of Hours/minutes you want your post to be anticipated <input name="minus" type="number" value="" /><br/>
<?php $minus = $_GET['minus']; ?>
<!--save setting on the bottom -->
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" />
</form></div>
<?php
add_action('admin_init', 'plugin_admin_init');
function plugin_admin_init(){
register_setting( 'plugin_options', 'plugin_options', 'plugin_options_validate' );
add_settings_section('plugin_main', 'Main Settings', 'plugin_section_text', 'plugin');
add_settings_field('plugin_text_string', 'Plugin Text Input', 'plugin_setting_string', 'plugin', 'plugin_main');
}
}