Re: Question on ACS Routines
Then he would be right to use &USER1, and accomplish the same thing. I don't have the chance right now to test it, and I am not positive it is a RO reserved variable, although I never have used it so I would not know for sure. Doug John Kington wrote: Doug, As Darth stated, &USER is a read only variable passed into the alloc environment. I don't have access to an environment where I can run a quick test but I suspect you would get a translate error if you attempted to use a filter list with name &USER. Regards, John -- 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
Re: Question on ACS Routines
>>I don't think so. You can mask any filtlist (I do all kinds, db2 >>datasets, tso, ftp, ftpusers, etc). The include would be masked with the >>ID's he wanted to include (or exclude, for that matter), or at least >>that's what we do. >>Doug // I agree that you can have lots of different filterlist's - I just don't think you can have one defined &USER as that is defined as an SMS read-only Variable. Where I've had the need for a filter list of user ID's, I used a name like &USER_ID or &AUTH_USER, etc. >From the manual: "z/OS V1R9.0 DFSMS Storage Administration Reference (for DFSMSdfp, DFSMSdss, DFSMShsm)" 1.16.3 Read-Only Variables Most ACS variables are read-only. Read-only variables contain data set and system information, and they reflect what is known at the time of the allocation request. You can use read-only variables in comparison operations, but you cannot change their values. Attention: In the data class ACS routine, the &DSNTYPE, &DSORG, &MAXSIZE, &NVOL, &RECORG, and &SIZE variables all default to null if no corresponding value is specified in the JCL. Some values of the &DSNTYPE variable are set from values on the DD statement or dynamic allocation. All of the read-only variables appear in Table 22. The read-only variables are case sensitive. The following pages explain the uses of the read-only variables. Table 22. Read-Only Variables &ACCT_JOB &ACCT_STEP &ACSENVIR &ALLVOL &ANYVOL &APPLIC &BLKSIZE &DD &DEF_DATACLAS &DEF_MGMTCLAS &DEF_STORCLAS &DSN &DSNTYPE &DSORG &DSOWNER &DSTYPE &EXPDT &FILENUM &GROUP &HLQ &JOB &LABEL &LIBNAME &LLQ &MAXSIZE &MEMHLQ &MEMLLQ &MEMN &MEMNQUAL &MSPDEST &MSPARM &MSPOLICY &MSPOOL &MSVGP &NQUAL &NVOL &PGM &RECORG &RETPD &SECLABL &SIZE &SYSNAME &SYSPLEX &UNIT &USER &XMODE . . . . &USER The user ID of the person allocating the data set. When DFSMShsm invokes the ACS routines, &USER is either the requestor of the recall or recover, or the user ID of the DFSMShsm address space. If the environment is recall or recover, the variable is set only if the requestor of the recall or recover is not a DFSMShsm authorized user. (See "Determining Distributed FileManager/MVS Data Set Creation Requests" in topic 1.16.3.7 for Distributed FileManager/MVS usage information.) Type: Literal Max value: 8 characters ** 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
Re: Question on ACS Routines
The 2 of you talking have explained why it's not working. I'm the guy do the allocation though 3.2 and when I allocate a dataset using my userid as the HLQ, it works perfectly. When I try allocating someone else's datasets with their HLQ, it doesn't work... You've cleared up the mystery... Thanks guys... George Rodriguez Specialist, Systems Programmer Network & Technical Services (561) 357-7652 (office) (561) 707-3496 (mobile) School District of Palm Beach County 3348 Forest Hill Blvd. Room B-332 West Palm Beach, FL. 33406-5869 Florida's Only A-Rated Urban District For Five Consecutive Years -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Darth Keller Sent: Thursday, September 17, 2009 1:28 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Question on ACS Routines >>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 Good point, Doug - but &USER is a read-only variable which IIRC is the ID of the user allocating the DS. Maybe what he's trying to accomplish is to check the 1st level against the USER id - in which case, he probably needs to specify &DSN(1) instead of DSN. ddk (I still stand behind my statements about WRITE's & EXIT's!) ** 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 -- --Palm Beach County Schools- Rated "A" by the Florida Department of Education 2005-2009 -Home of Florida's first LEED Gold Certified School- ---http://www.palmbeachschools.org- The District of Palm Beach County is an Equal Education Opportunity Provider and Employer. Under Florida law, e-mail addresses are public records. If you do not want your e-mail address released in response to a public records request, do not send electronic mail to this entity. Instead, contact this office by phone or in writing. -- 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
Re: Question on ACS Routines
Doug, As Darth stated, &USER is a read only variable passed into the alloc environment. I don't have access to an environment where I can run a quick test but I suspect you would get a translate error if you attempted to use a filter list with name &USER. Regards, John -- 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
Re: Question on ACS Routines
George, >SELECT > > WHEN (&HLQ = &USER)/* When the dataset's HLQ is a*/ > > SET &STORCLAS = 'USERSC' /* userid, set the storage class */ > > /* to USERSC. */ This looks like it should work if you are in the alloc acs environment. I second Darth's suggestion that you put in write statements to write out the variables &HLQ and &USER to the job log. If you are running this against a test case, you do need to provide the user value in the testcase. Regards, John -- 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
Re: Question on ACS Routines
I don't think so. You can mask any filtlist (I do all kinds, db2 datasets, tso, ftp, ftpusers, etc). The include would be masked with the ID's he wanted to include (or exclude, for that matter), or at least that's what we do. Doug Darth Keller wrote: 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 Good point, Doug - but &USER is a read-only variable which IIRC is the ID of the user allocating the DS. Maybe what he's trying to accomplish is to check the 1st level against the USER id - in which case, he probably needs to specify &DSN(1) instead of DSN. ddk (I still stand behind my statements about WRITE's & EXIT's!) ** 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
Re: Question on ACS Routines
>>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 Good point, Doug - but &USER is a read-only variable which IIRC is the ID of the user allocating the DS. Maybe what he's trying to accomplish is to check the 1st level against the USER id - in which case, he probably needs to specify &DSN(1) instead of DSN. ddk (I still stand behind my statements about WRITE's & EXIT's!) ** 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
Re: Question on ACS Routines
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
Re: Question on ACS Routines
>>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
Question on ACS Routines
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 Specialist, Systems Programmer Network & Technical Services (561) 357-7652 (office) (561) 707-3496 (mobile) School District of Palm Beach County 3348 Forest Hill Blvd. Room B-332 West Palm Beach, FL. 33406-5869 Florida's Only A-Rated Urban District For Five Consecutive Years -- --Palm Beach County Schools- Rated "A" by the Florida Department of Education 2005-2009 -Home of Florida's first LEED Gold Certified School- ---http://www.palmbeachschools.org- The District of Palm Beach County is an Equal Education Opportunity Provider and Employer. Under Florida law, e-mail addresses are public records. If you do not want your e-mail address released in response to a public records request, do not send electronic mail to this entity. Instead, contact this office by phone or in writing. -- 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