On Fri, 15 Dec 2006 00:13:43 -0500, Rick Troth <[EMAIL PROTECTED]> wrote:
>Do you have a COMMAND REXX in the mix intercepting the built-in?
>
>-- R;
Sorry Rick, but when you code 'xxx' as stage PIPE first looks for a built
-in
stage, only if not found, it looks for "xxx REXX".
As Richard was too lazy/didn't understand/didn't dare/ ... I ran a series
of
commands to show the use of CMDCALL with SFS. It also proves that DELETE
USER works perfectly well from under the COMMAND stage. You truly NEED t
he
CMDCALL prefix to find out what goes wrong with SFS commands.
ENRoll user TEST
Ready KRIS at VMKBBR01 ; T=0.01/0.01 08:25:09
ENRoll user TEST
DMSJEN1166E Userid TEST is already enrolled
Ready KRIS at VMKBBR01 (00040); T=0.01/0.01 08:25:41
PIPE COMMAND ENROLL USER TEST!CONS
Ready KRIS at VMKBBR01 (00040); T=0.01/0.01 08:25:49
PIPE COMMAND CMDCALL ENROLL USER TEST!CONS
DMSJEN1166E Userid TEST is already enrolled
Ready KRIS at VMKBBR01 (00040); T=0.01/0.01 08:25:56
delete user TEST2 (Noconf
Deleted USERs:
TEST2
DMSJDE1224W One or more userids were not enrolled as USERs
Ready KRIS at VMKBBR01 (00004); T=0.01/0.01 08:27:15
PIPE COMMAND DELETE USER TEST2 (NOCONF!CONS
Deleted USERs:
TEST2
Ready KRIS at VMKBBR01 (00004); T=0.01/0.01 08:27:29
PIPE COMMAND CMDCALL DELETE USER TEST2 (NOCONF!CONS
Deleted USERs:
TEST2
DMSJDE1224W One or more userids were not enrolled as USERs
Ready KRIS at VMKBBR01 (00004); T=0.01/0.01 08:27:46
PIPE COMMAND CMDCALL DELETE USER TEST (NOCONF!CONS
Deleted USERs:
TEST
Ready KRIS at VMKBBR01 ; T=0.01/0.01 08:28:26
In EXECs I often use constructs like this when dealing with SFS commands:
'PIPE COMMAND CMDCALL LISTDIR' JobDirid '(NOSUB',
'!VAR EMSG!DROP!CHOP 1!Var fm'
select
when rc=28 then jobmode='-'
when rc<>0 then call ErrExit rc,emsg
otherwise /* Job found. Access dirid */
if fm='-' then do
Call CSL 'DMSGETFM RC REAS jobmode'
Key points are CMDCALL and VAR EMSG!DROP. Because with CMDCALL you not o
nly
get error messages but also headers appear. In general -with CMDCALL- th
e
first line is either an error message, either a headerline.
CMDCALL can also help the lazy ones. Everyone should know that decent ex
ecs
run with ADDRESS COMMAND. As a result, STAE for example doesn't produce
error messages. Sometimes though STATE's error message is usefull for la
zy
programmers:
Not so lazy
'STATE' inputfile
if rc<>0 then do
say 'Input file "'inputfile'" not found'; exit rc; end
Lazy, but more, extact, error information is displayed
'CMDCALL STATE' inputfile
if rc<>0 then exit rc
All this is explained in great detail in both "telecourses" Guy De Ceulae
r
and I produced.
Advanced REXX:
http://www.vm.ibm.com/download/packages/descript.cgi?TCVM1
(look for Lesson1, Chapter 3)
Pipelines:
http://www.vm.ibm.com/download/packages/descript.cgi?TCVM
(look for Lesson2, Chapter 3)
Yours Knigth of VM,
Kris Buelens