⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample3.cmd

📁 Software Testing Automation Framework (STAF)的开发代码
💻 CMD
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2001                                              *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************//*********************************************************************//* Sample3.cmd - Rexx sample program using STAF                      *//*********************************************************************//* This sample writes a monitor message and then queries it, this    *//* is done 10 times.  A size of the string written is based on a     *//* random number generated.                                          *//*                                                                   *//* Returns: 0, on success                                            *//*         >0, if an error is encountered                            *//*********************************************************************//* Date        Who           Comment                                 *//* ----------  ------------  --------------------------------------- *//* 03/01/1998  D. Randall    File Created                            *//*********************************************************************/SIGNAL ON HALT NAME STAFAbort/* Load STAF functions */call RxFuncAdd "STAFLoadFuncs", "RXSTAF", "STAFLoadFuncs"call STAFLoadFuncs/* Register Sample to STAF */call STAFRegister "STAF_REXX_Sample3"if RESULT \= 0 thendo  say "Error registering to STAF:" RESULT  RETURN RESULTend/* Query STAF for a variable */STAFRC = STAFSubmit("local", "var", "resolve {STAF/Config/MachineNickname}")if STAFRC = 0 then machine = STAFResultelsedo  say "Unable to determine machine nickname!"  call STAFUnRegister  RETURN STAFRCendservice = "monitor"times = 10wait = 0string = "Software Testing Automation Framework (STAF) (C) Copyright IBM Corp.",         "1998 All Rights Reserved"do times  message = substr(string,1,1 + random(99))  msglen = length(message)  data = "LOG MESSAGE :"msglen":"message  STAFRC = STAFSubmit("local", service, data)  if STAFRC \= 0 then    say "Monitor Log Error: " STAFRC STAFResult  data = "query machine" machine "handle" STAFHandle  STAFRC = STAFSubmit("local", service, data)  if STAFRC = 0 then    say STAFResult  else    say "Monitor Query Error: " STAFRC STAFResultend/* Unregister */call STAFUnRegisterRETURN 0/*********************************************************************//* STAFAbort - If user aborts, make sure STAF unregister occurs.     *//*********************************************************************/STAFAbort:  call STAFUnRegister  EXIT 1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -