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

📄 sample2.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.     *//*****************************************************************************//*********************************************************************//* Sample2.cmd - Rexx sample program using STAF                      *//*********************************************************************//* This sample loads REXX and STAF Functions, registers to STAF,     *//* inititates an asynchronous PMSEEK process, queries, stops,        *//* queries again then frees the process, then unregisters.           *//*                                                                   *//* Note that this example explictly uses STAFHandle in all calls     *//* and additional error checking is needed.                          *//*                                                                   *//* Returns: 0,  on success                                           *//*         >0, if an error is encountered                            *//*********************************************************************//* Date        Who           Comment                                 *//* ----------  ------------  --------------------------------------- *//* 02/02/1998  D. Randall    File Created                            *//*********************************************************************/SIGNAL ON HALT NAME STAFAbort/* Load system functions */call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"call SysLoadFuncs/* Load STAF functions */call RxFuncAdd "STAFLoadFuncs", "RXSTAF", "STAFLoadFuncs"call STAFLoadFuncs/* Register Sample to STAF */call STAFRegister "STAF_REXX_Sample2", "STAFHandle"if RESULT \= 0 thendo  say "Error registering to STAF:" RESULT  RETURN RESULTend/* Set a global variable for start timestamp */request = " GLOBAL SET Start="||DATE('s')||'-'||TIME()STAFRC = STAFSubmit(STAFHandle, "local", "VAR", request)/* Build the process start request with a work load name of STAFSample2 */request = "START COMMAND pmseek.exe WORKLOAD STAFSample2"/* Submit the request to STAF */STAFRC = STAFSubmit(STAFHandle, "local", "PROCESS", request)if STAFRC = 0 thendo  PROCHandle = STAFResult  STAFRC = STAFSubmit(STAFHandle, "local", "VAR", "LIST")  say STAFResult  say "Press <Enter> to continue"  pull response  request = "query handle" PROCHandle  STAFRC = STAFSubmit(STAFHandle, "local", "PROCESS", request)  say STAFResult  say "Press <Enter> to stop PMSEEK"  pull response  STAFRC = STAFSubmit(STAFHandle, "local", "PROCESS", "STOP HANDLE" PROCHandle)  call SysSleep 1  STAFRC = STAFSubmit(STAFHandle, "local", "PROCESS", request)  say STAFResult  STAFRC = STAFSubmit(STAFHandle, "local", "PROCESS", "FREE HANDLE" PROCHandle)  STAFRC = STAFSubmit(STAFHandle, "local", "var", "resolve {Start}")  if (STAFRC = 0) & (STAFResult \= '') then Start = STAFResult  say "Start =" Start  say "End   =" DATE('s')||'-'||TIME()end/* Unregister */call STAFUnRegister STAFHandleRETURN 0/*********************************************************************//* STAFAbort - If user aborts, make sure STAF unregister occurs.     *//*********************************************************************/STAFAbort:  call STAFUnRegister STAFHandle  EXIT 1

⌨️ 快捷键说明

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