Do you have a filtlist? I believe that to use &user, you would have to
filter on user, as in
FILTLIST USER INCLUDE (XXX*)
then
WHEN (&DSN EQ &USER)
DO
SET &STORCLAS EQ 'USERSC'
EXIT
END
Doug
Darth Keller wrote:
Hi Listeners,
I'm trying to understand how this works:
SELECT
WHEN (&HLQ = &USER) /* When the dataset's HLQ is a */
SET &STORCLAS = 'USERSC' /* userid, set the storage class */
/* to USERSC. */
&USER is a read-only variable and the storage class is set to USERSC if
the HLQ is a users id. For some reason, this logic is not working and I
can't figure out why? There are more entries in the SELECT but I moved
this one to the top...
Thanks in advance...
George Rodriguez
//////////////////
I highly recommend that you use WRITE statements in your code.
Applications may initially complain about them, but stick by your guns -
applications will get used to the extra output and the WRITES will make
your life so much easier when trying to debug errors and save you untold
time and headaches trying to resolve issues like this. I also recommend
using paired SET/EXIT statements. From the code stub and the little
information you've given us, there's no way for us to tell if the
allocation fell out of the code before it reached this SELECTstatement or
continued on after your SET statement and was subsequently re-assigned
another storage class.
Here's an example:
WHEN ( &DSNTYPE EQ &DSN_TYPE_LIB ) /* Filter list for PDS or
PDSE ds's */
DO
SET &STORCLAS = 'SCTSO'
WRITE 'SCHS0050 ' &DSN ' ' &DSNTYPE /* SCHS0050 is a unique
pointer to help identify the exit point for the code.
EXIT
END
Every segment in my code is set up the same way and it's a piece of cake
to debug - the EXIT point in the SMS code is clearly identified for every
allocation. I've done this at multiple shops and I've never regreted it.
Also have you set up your test cases and run them? Another good
technique. Keep you old test cases and build new ones as needed. Run
them against both the old code and the new code.
ddk
**************************************************************************************
This e-mail message and all attachments transmitted with it may contain legally
privileged and/or confidential information intended solely for the use of the
addressee(s). If the reader of this message is not the intended recipient, you
are hereby notified that any reading, dissemination, distribution, copying,
forwarding or other use of this message or its attachments is strictly
prohibited. If you have received this message in error, please notify the
sender immediately and delete this message and all copies and backups thereof.
Thank you.
**************************************************************************************
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html