How to resolve ISPP330



IBM's Command List programming language & Restructured Extended Executor

Re: How to resolve ISPP330

Postby Pedro » Mon Aug 18, 2014 9:34 pm

And also, if you have any materials on this where I can refer things regarding SUBCOM and the things related to it: Kindly post the same.

You are writing in a rexx program that runs on TSO... you need to have the TSO/E Rexx Reference manual. Download from here: http://www-03.ibm.com/systems/z/os/zos/ ... v/v2r1pdf/ Perhaps also get the TSO/E Rexx User's Guide.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: Re: How to resolve ISPP330

 

Re: How to resolve ISPP330

Postby Steve Coalbran » Mon Aug 25, 2014 4:00 pm

You need to communicate between the exec and the macro as they don't inherit each other's variable pool.
Using the VPUT/VGET service allows this but you have to pass anything needed back and forth.

This example below is simplistic and will only work properly when executed as TSO Command.
If executed as a MACRO it will CANCEL the member being executed.

Beware, untested so may contain the odd typo!?
/*REXX*/
PARSE ARG parms
PARSE VALUE TRANSLATE(parms,","," ")",,,,,,"  ,
       WITH dsn","string","scol","ecol"," .
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT
"MACRO (STRING) NOPROCESS"
IF( RC=0) THEN
   CALL ASMACRO   
ELSE
   CALL ASEXEC
EXIT

ASEXEC:
ADDRESS ISPEXEC
"VPUT(SCOL,ECOL) SHARED  "
"VIEW DATASET ('USER.XYZ') MACRO(CNTSTRGS)"
"VGET(FC,SCOL,ECOL) SHARED "
zedsmsg = fc "OCCURENCES"
zedlmsg = "String '"string"' was found" fc "times between columns" scol"-"ecol"."
"SETMSG MSG(ISRZ000)"
RETURN

ASMACRO:
ADDRESS ISREDIT
ADDRESS ISPEXEC "VGET (STRING,SCOL,ECOL) SHARED "
"(DW) = DATA_WIDTH "
IF( DATATYPE(scol)<>"NUM" )THEN scol=1
IF( DATATYPE(ecol)<>"NUM" )THEN ecol=dw
"F ALL '"string'"" scol ecol
"(FC) = FIND_COUNTS "
ADDRESS ISPEXEC "VPUT(FC,SCOL,ECOL) SHARED  "
"CANCEL "
RETURN

Another technique is to VPUT/VGET as a vector - like this...

PARSE VALUE dsn","string","fcol","ecol","fc"," WITH cntparms
VPUT (CNTPARMS) SHARED

then reading

VGET (CNTPARMS) SHARED
PARSE VALUE cntparms",,,,," WITH dsn","string","fcol","ecol","fc"," .
Steve
User avatar
Steve Coalbran
 
Posts: 102
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Previous

Return to CLIST & REXX