8.60.4 Examples
Example 1:
Execute Rexx script “testrexx.rexx” with arguments ‘arg1’, ‘arg2’ and ‘arg3’.
HHC00013I Herc command: 'exec testrexx arg1 arg2 arg3’
testrexx started
testrexx version . . . . : REXX-Regina_3.6(MT) 5.00 31 Dec 2011
testrexx source . . . . : WIN64 COMMAND d:\mvs\conf\testrexx.REX
testrexx hostenv . . . . : HERCULES
testrexx date . . . . . : 6 May 2012
testrexx time . . . . . : 02:39:19
testrexx arguments . . . : arg1 arg2 arg3
testrexx Hercules version : 3.08.0
testrexx RC environment . : D:\MVS\CONF\Hercules_Test.rc
HHC02208I Uptime 04:02:33
testrexx ended
Figure 124: EXEC command
The executed REXX script from example 1 is the following:
/* REXX */
parse arg parms
parms = space(parms)
argc = words(parms)
parse version ver
parse source src
env = address()
parse var src . . cmd
who = filespec("n",cmd)
parse var who who "." .
say who " started"
say who " version . . . . :" ver
say who " source . . . . :" src
say who " hostenv . . . . :" env
say who " date . . . . . :" date()
say who " time . . . . . :" time()