/* Rexx --------------------------------------------------------------*/ /* */ /* From an IOF server session; */ /* SNAP a JOB, OUTPUT GROUP, or SYSOUT DATASET */ /* to the client session. */ /* */ /* Snap parms can be specified on the command. */ /* */ /* Examples: */ /* 1 %SVPRINT DEST(R23) prints item # 1 */ /* */ /* 5 %SVPRINT CLASS(J) HOLD FORMS(1999) prints item # 5 to class J */ /* forms 1999 and HOLDS the */ /* printed copy on the client.*/ /* */ /* 1 3 5-7 %SVPRINT prints items 1, 3, and */ /* 5 through 7. */ /* */ /*--------------------------------------------------------------------*/ PUSH 0 /*-------------Parm Description-------------------*/, "MENU()" /* Menu number of job, group or data set to snap */, "CLASS(A)" /* Target sysout class */, "DEST(LOCAL)" /* Target destination */, "FORMS(STD)" /* Target forms */, "HOLD" /* If specified, target will be HELD */, "TEST" /* Trace exec if TEST is specified */, /*------------------------------------------------*/ parse arg arg_list /* Process input parms */ interpret IOFProc(arg_list) /* Invoke IOFProc to process parms */ if rc > 0 then exit /* just like clist parms */ if test = "TEST" then trace 'R' trace 'R' call on error parse arg ssparms '/' snapparms address IOF 'SC SS CLASS('class') DEST('dest') FORMS('forms')' call IOF$SL1 'menu('menu')' menu 'SNAP' 'SNAPCLOS' exit error: say '**** Error' rc '****' return rc end