Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SEPARM from REXX

44 views
Skip to first unread message

Frank M. Ramaekers

unread,
Aug 9, 2016, 8:45:56 AM8/9/16
to

It appears that I cannot set a z/VSE variable with “Address JCL ‘SETPARM variable=value’” without the result being upper-cased.   Although you can from JCL.

Is that your experience as well?

 

// JOB FRTEST                                         

// EXEC LIBR,SIZE=AUTO                                

  ACCESS  S=AISYS.PROCTEST                            

  CATALOG TESTREXX.PROC REP=Y EOD=/+ DATA=Y           

  Trace O                                             

  Address JCL "// SETPARM TESTIT='Mixed case variable'"

Exit                                                  

/+                                                     

/*                                                    

// SETPARM TESTIT=''                                  

// LIBDEF PROC,SEARCH=AISYS.PROCTEST                  

// EXEC REXX=TESTREXX,TESTIT                          

/*                                                    

// EXEC SYWTO,PARM='TESTIT=&TESTIT'                   

/*

 

Result:

BG 0000 // JOB FRTEST                                      

        DATE 08/09/2016, CLOCK 07/44/17                    

BG 0000 TESTIT=MIXED CASE VARIABLE                         

BG 0000 EOJ FRTEST    MAX.RETURN CODE=0000                 

        DATE 08/09/2016, CLOCK 07/44/18, DURATION   00/00/00

 

Some other method of setting a z/VSE variable from REXX and respecting the case?

 

Frank M. Ramaekers Jr. | Systems Programmer | Information Technology | American Income Life Insurance | 254-761-6649

 

Dieltiens Geert via VSE-L

unread,
Aug 9, 2016, 10:13:39 AM8/9/16
to

Frank,

 

Same behaviour here (5.1.1 + PTFs). Seems like a bug?

 

Another way of passing JCL-statements from within REXX is by using the "queue" function: any data left on the stack at end-of-program will be passed as JCL commands, and apparently without any uppercase translation.

When all data on the stack has been processed, REXX finishes and the job continues. Not the most elegant way of doing things though.

 

// EXEC LIBR,SIZE=AUTO                                

  ACCESS  S=AISYS.PROCTEST                            

  CATALOG TESTREXX.PROC REP=Y EOD=/+ DATA=Y           

  Trace O                                             

  queue "// SETPARM TESTIT='Mixed case variable'"

Exit                                                  

/+                                                     

/*                                                    

 

Bye,

Geert.

 
DISCLAIMER
 
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this email
in error please notify postm...@vanbreda.be
This footnote also confirms that this email has been checked
for the presence of viruses.
 
Informatica Van Breda NV BTW BE 0427 908 174

Jeffrey Barnard

unread,
Aug 9, 2016, 10:47:33 AM8/9/16
to
This same topic was brought up about 5 years ago.

Back then someone suggested using Address Command instead of Address JCL.
This might or might not work.

I believe Address JCL upper cases the JCL passed to it. Folks have posted
about the same issue on z/OS. I suspect the code we use originally came
from them.

Regards,
Jeff

_______________________________________________
VSE-L mailing list
VS...@lists.lehigh.edu
https://lists.lehigh.edu/mailman/listinfo/vse-l

Jeffrey Barnard

unread,
Aug 9, 2016, 11:28:49 AM8/9/16
to
If you want to extract the level 0 SETPARM values using REXX, you can do
something like this ...

// EXEC LIBR,SIZE=512K,PARM='MSHP'
AC S=BSILIB.INSTALL
CATALOG GETPARM.PROC EOD=/% DATA=YES REPLACE=YES

Trace off

Say
Say 'Finding SETPARM values ....'

call getparm

do i = 1 to setparm.0
parse var setparm.i a b
say "... found // SETPARM" a||"='"||b||"'"
end
do i = 1 to setparm.0
say "... @"||a "set to" "'"||b||"'"
end

Say '... SETPARM processing completed.'
Say

Exit

getparm:
setparm.0 = 0

comreg = c2x(storage(14,4))
ijbjcwa = d2x(x2d(comreg)+136)
ijbjcwa = c2x(storage(ijbjcwa,4))
jcwprpt = d2x(x2d(ijbjcwa)+656)
jcwprpt = c2x(storage(jcwprpt,4))
level0 = d2x(x2d(jcwprpt)+24)
level0 = c2x(storage(level0,4))
endtab = d2x(x2d(level0)+16)
endtab = c2x(storage(endtab,4))
strtab = d2x(x2d(level0)+36)

do while x2d(strtab) < x2d(endtab)
setparm.0 = setparm.0 + 1
syslen = c2d(storage(strtab,2))
ptr = d2x(x2d(strtab)+3)
sysnam = strip(storage(ptr,7))
ptr = d2x(x2d(ptr)+7)
sysval = storage(ptr,syslen)
i = setparm.0
setparm.i = sysnam sysval
interpret "@"sysnam "= '"sysval"'"

strtab = d2x(x2d(ptr) + syslen)
end
Return 0
/%
/*
// LIBDEF PROC,SEARCH=BSILIB.INSTALL
// SETPARM S1='Variable 1'
// SETPARM S2='Variable 2'
// EXEC REXX=GETPARM
/*

....

// EXEC REXX=GETPARM

Finding SETPARM values ....
... found // SETPARM S1='Variable 1'
... found // SETPARM S2='Variable 2'
... @S2 set to 'Variable 2'
... @S2 set to 'Variable 2'
... SETPARM processing completed.

1S55I LAST RETURN CODE WAS 0000


Enjoy.

Frank M. Ramaekers

unread,
Aug 9, 2016, 11:39:06 AM8/9/16
to
Yes Jeff, I think I got some similar code from you. THANKS! Now on
to SETPARM from REXX (into LEVEL0 and no upper-case translation).

Frank M. Ramaekers Jr.
0 new messages