Re: Obtaining current ASID in REXX
Thanks Roberto, I can use JOBID to get this working too! – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Roberto Halais Sent: Thursday, February 04, 2016 2:01 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX /* REXX */ ascb = C2D(Storage(224,4)) assb = C2D(Storage(D2X(ascb+336),4)) jsab = C2D(Storage(D2X(assb+168),4)) jbnm = Storage(D2X(jsab+28),8) jbid = Storage(D2X(jsab+20),8) usid = Storage(D2X(jsab+44),8) Say 'JOBNAME='jbnm' JOBID='jbid' USERID='usid Maybe you can get from here. This is working code. On Thu, Feb 4, 2016 at 9:14 AM, Elardus Engelbrecht < elardus.engelbre...@sita.co.za> wrote: > Sankaranarayanan, Vignesh wrote: > > > >I'm looking to add a REXX logic to the beginning of an ad-hoc STC. > >Runs twice in an hour. Problem is, sometimes some instances just hang > around due to an XCOM issue. > >Yes, the *real* answer is to fix the XCOM issue but I'm just handing > >one > thing at a time. > > XCOM? Hmmm, smells like a TCP/IP and/or a firewall problem. > > >So my idea of handling this is to add a starting step to the STC that > does the following in REXX: > >1. Issue D A, > >2. Find if there are active instances, apart from itself 3. Cancel > >all active instances (sometimes, I found instances from many > days ago just hanging around doing nothing) > >4. REXX exits cleanly so that a new instance runs > > Good. Point 2+3 will not work for your attempt. > > Check Mark Zelden's website for his REXX utility which lists ALL ASIDs > currently running. Using the output will help you to locate ALL the > instances and get rid of them. > > HTH! > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- "I am as you, in you, for you. One as you in all, as all, forever. My call is your call." -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Thanks Elardus. Please ignore my verbal incompetence. What I meant hopefully came through though - cancel all ASID's except the active one. There is an fix from CA for this already but I'm just taking as an opportunity to learn something, hopefully by not having to spend way too much time digging into mainframe memory! – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: Thursday, February 04, 2016 1:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX Sankaranarayanan, Vignesh wrote: >Yup, I have a copy of Mark's program available. Was hoping to find a >simpler/shorter block of code that would work :) ;-D >2+3 won't work... why? Simply, because you initially said in your first post, if your program is running in batch, it should shows the ASID of itself. Same for your TSO session, it should says same for the TSO session. This will not work because you said ('Find if there are active instances, apart from itself ') later you want all instances to get rid of. Thus you need something to check all running ASIDs and then get rid of them. >The XCOM bit works 99% of the time, there are just some times that it doesn't >work. The next run that happens within half an hour goes OK, in most cases. If that is repeatable, you should check with the sysprogs and vendor. They can't make their problem yours... Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Thanks Lucas, this looks like NetView REXX (?). I have this part ready and waiting for the ASID-identifying bit :) I can now make it work with Roberto's snippet to get the JOBID. – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Lucas Rosalen Sent: Thursday, February 04, 2016 2:04 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX Maybe you could try this REXX with some adjustments: trace Off 'pipe MVS D A,CIC*', '! corrwait 5', '! sep', '! loc /A=/', '! stem result.' if result.0 > 0 then do i = 1 to result.0 say 'task:' word(result.i,1) 'asid:' word(result.i,6)=> this "6" might change end return With small enhancements, this would let you get the "MVS C taskname,A=" command issued --- *Lucas Rosalen* Emails: rosalen.lu...@gmail.com / *lrosa...@pl.ibm.com <lrosa...@br.ibm.com>* LinkedIn: http://br.linkedin.com/in/lrosalen Phone: +48 792 809 198 2016-02-04 14:55 GMT+01:00 Elardus Engelbrecht < elardus.engelbre...@sita.co.za>: > Sankaranarayanan, Vignesh wrote: > > >Yup, I have a copy of Mark's program available. Was hoping to find a > simpler/shorter block of code that would work :) > > ;-D > > >2+3 won't work... why? > > Simply, because you initially said in your first post, if your program > is running in batch, it should shows the ASID of itself. Same for your > TSO session, it should says same for the TSO session. > > This will not work because you said ('Find if there are active > instances, apart from itself ') later you want all instances to get > rid of. Thus you need something to check all running ASIDs and then get rid > of them. > > >The XCOM bit works 99% of the time, there are just some times that it > doesn't work. The next run that happens within half an hour goes OK, > in most cases. > > If that is repeatable, you should check with the sysprogs and vendor. > They can't make their problem yours... > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Thanks Lizette, I believe I'm signed up to that list as well, just forgot I could post there! – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Lizette Koehler Sent: Thursday, February 04, 2016 5:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX If you were not aware, there is a TSO REXX list that could also be very help in all things REXX. To join, if you have not done so, TSO REXXhttp://www2.marist.edu/htbin/wlvindex?TSO-REXX Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Sankaranarayanan, Vignesh > Sent: Thursday, February 04, 2016 6:00 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Yup, I can understand that much! But my expertise is way too limited > to even try to go chasing after memory addresses. > > – Vignesh > Mainframe Infrastructure > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Elardus Engelbrecht > Sent: Thursday, February 04, 2016 12:56 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Sankaranarayanan, Vignesh wrote: > > >Sorry, I don't understand. > >I'm looking this up now, hoping it's not an assembler way! > > You use the REXX functions like C2D and STORAGE, etc. to chase those pointers. > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > MARKSANDSPENCER.COM > > Unless otherwise stated above: > Marks and Spencer plc > Registered Office: > Waterside House > 35 North Wharf Road > London > W2 1NW > > Registered No. 214436 in England and Wales. > > Telephone (020) 7935 4422 > Facsimile (020) 7487 2670 > > www.marksandspencer.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Towards the bottom of this list of documents there are titles with "Data Area" in them. http://www-03.ibm.com/systems/z/os/zos/library/bkserv/v2r2pdf/#IEA They will (indirectly) explain why/how that bit of Rexx works. The journey always begins at home: "The PSA maps the storage that starts at location 0 for the related processor." On Fri, Feb 5, 2016 at 5:35 AM, Sankaranarayanan, Vignesh < vignesh.v.sankaranaraya...@marks-and-spencer.com> wrote: > Good news! > > I plunged into the "depths" of the ASCB and found what I needed.. > > /* REXX */ > ascb = C2D(Storage(224,4)) > ascbasid = C2X(Storage(D2X(ascb+36),2)) > Say 'ascbasid='ascbasid > > LOL, can't believe it was this easy. > > – Vignesh > Mainframe Infrastructure > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Sankaranarayanan, Vignesh > Sent: Friday, February 05, 2016 8:46 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Thanks Lizette, > I believe I'm signed up to that list as well, just forgot I could post > there! > > – Vignesh > Mainframe Infrastructure > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Lizette Koehler > Sent: Thursday, February 04, 2016 5:09 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > If you were not aware, there is a TSO REXX list that could also be very > help in all things REXX. > > To join, if you have not done so, > TSO REXXhttp://www2.marist.edu/htbin/wlvindex?TSO-REXX > > Lizette > > > > -Original Message- > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > > On Behalf Of Sankaranarayanan, Vignesh > > Sent: Thursday, February 04, 2016 6:00 AM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: Re: Obtaining current ASID in REXX > > > > Yup, I can understand that much! But my expertise is way too limited > > to even try to go chasing after memory addresses. > > > > – Vignesh > > Mainframe Infrastructure > > > > -Original Message- > > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > > On Behalf Of Elardus Engelbrecht > > Sent: Thursday, February 04, 2016 12:56 PM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: Re: Obtaining current ASID in REXX > > > > Sankaranarayanan, Vignesh wrote: > > > > >Sorry, I don't understand. > > >I'm looking this up now, hoping it's not an assembler way! > > > > You use the REXX functions like C2D and STORAGE, etc. to chase those > pointers. > > > > Groete / Greetings > > Elardus Engelbrecht > > > > -- > > For IBM-MAIN subscribe / signoff / archive access instructions, send > > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > > MARKSANDSPENCER.COM > > > > Unless otherwise stated above: > > Marks and Spencer plc > > Registered Office: > > Waterside House > > 35 North Wharf Road > > London > > W2 1NW > > > > Registered No. 214436 in England and Wales. > > > > Telephone (020) 7935 4422 > > Facsimile (020) 7487 2670 > > > > www.marksandspencer.com > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send email > to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send email > to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Good news! I plunged into the "depths" of the ASCB and found what I needed.. /* REXX */ ascb = C2D(Storage(224,4)) ascbasid = C2X(Storage(D2X(ascb+36),2)) Say 'ascbasid='ascbasid LOL, can't believe it was this easy. – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Sankaranarayanan, Vignesh Sent: Friday, February 05, 2016 8:46 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX Thanks Lizette, I believe I'm signed up to that list as well, just forgot I could post there! – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Lizette Koehler Sent: Thursday, February 04, 2016 5:09 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX If you were not aware, there is a TSO REXX list that could also be very help in all things REXX. To join, if you have not done so, TSO REXXhttp://www2.marist.edu/htbin/wlvindex?TSO-REXX Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Sankaranarayanan, Vignesh > Sent: Thursday, February 04, 2016 6:00 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Yup, I can understand that much! But my expertise is way too limited > to even try to go chasing after memory addresses. > > – Vignesh > Mainframe Infrastructure > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] > On Behalf Of Elardus Engelbrecht > Sent: Thursday, February 04, 2016 12:56 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Sankaranarayanan, Vignesh wrote: > > >Sorry, I don't understand. > >I'm looking this up now, hoping it's not an assembler way! > > You use the REXX functions like C2D and STORAGE, etc. to chase those pointers. > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > MARKSANDSPENCER.COM > > Unless otherwise stated above: > Marks and Spencer plc > Registered Office: > Waterside House > 35 North Wharf Road > London > W2 1NW > > Registered No. 214436 in England and Wales. > > Telephone (020) 7935 4422 > Facsimile (020) 7487 2670 > > www.marksandspencer.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
PSAAOLD->ASCB (ASCBASID) On Thu, 4 Feb 2016 12:03:18 + "Sankaranarayanan, Vignesh"wrote: :>Hi folks, :> :>I'm looking for a piece of code in REXX to access the current ASID. I remember seeing this in one of the installation REXX'es that came with the BMC ICE for Control-M. :>I'm hoping that one of you has had to do this in the past and can help me out here. :> :>Ex: :>If I'm running a REXX via a job, the output should be the ASID of the job. :>If I'm running a REXX via a ISPF, the output should be the ASID of my logon procedure. :> :>Thank you! :> :>- Vignesh :>Mainframe Infrastructure :> :> :>MARKSANDSPENCER.COM :> :>Unless otherwise stated above: :>Marks and Spencer plc :>Registered Office: :>Waterside House :>35 North Wharf Road :>London :>W2 1NW :> :>Registered No. 214436 in England and Wales. :> :>Telephone (020) 7935 4422 :>Facsimile (020) 7487 2670 :> :>www.marksandspencer.com :> :>Please note that electronic mail may be monitored. :> :>This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
? Sorry, I don't understand. I'm looking this up now, hoping it's not an assembler way! - Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Binyamin Dissen Sent: Thursday, February 04, 2016 12:37 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX PSAAOLD->ASCB (ASCBASID) On Thu, 4 Feb 2016 12:03:18 + "Sankaranarayanan, Vignesh" <vignesh.v.sankaranaraya...@marks-and-spencer.com> wrote: :>Hi folks, :> :>I'm looking for a piece of code in REXX to access the current ASID. I remember seeing this in one of the installation REXX'es that came with the BMC ICE for Control-M. :>I'm hoping that one of you has had to do this in the past and can help me out here. :> :>Ex: :>If I'm running a REXX via a job, the output should be the ASID of the job. :>If I'm running a REXX via a ISPF, the output should be the ASID of my logon procedure. :> :>Thank you! :> :>- Vignesh :>Mainframe Infrastructure :> :> :>MARKSANDSPENCER.COM :> :>Unless otherwise stated above: :>Marks and Spencer plc :>Registered Office: :>Waterside House :>35 North Wharf Road :>London :>W2 1NW :> :>Registered No. 214436 in England and Wales. :> :>Telephone (020) 7935 4422 :>Facsimile (020) 7487 2670 :> :>www.marksandspencer.com :> :>Please note that electronic mail may be monitored. :> :>This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. :> :>-- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Binyamin Dissen <bdis...@dissensoftware.com> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Obtaining current ASID in REXX
Hi folks, I'm looking for a piece of code in REXX to access the current ASID. I remember seeing this in one of the installation REXX'es that came with the BMC ICE for Control-M. I'm hoping that one of you has had to do this in the past and can help me out here. Ex: If I'm running a REXX via a job, the output should be the ASID of the job. If I'm running a REXX via a ISPF, the output should be the ASID of my logon procedure. Thank you! - Vignesh Mainframe Infrastructure MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Sankaranarayanan, Vignesh wrote: >Sorry, I don't understand. >I'm looking this up now, hoping it's not an assembler way! You use the REXX functions like C2D and STORAGE, etc. to chase those pointers. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Inline panel display was: Obtaining current ASID in REXX
Thats cool. I always wish ISPF had a way to display a panel from inline data. Dana On Thu, 4 Feb 2016 17:23:58 +, Lindy Mayfieldwrote: > >It runs under ISPF. You just have to exec it. I put all the ISPF stuff >inside the code as data. ;-) > >Kind regards, >Lindy > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
/* REXX */ ascb = C2D(Storage(224,4)) assb = C2D(Storage(D2X(ascb+336),4)) jsab = C2D(Storage(D2X(assb+168),4)) jbnm = Storage(D2X(jsab+28),8) jbid = Storage(D2X(jsab+20),8) usid = Storage(D2X(jsab+44),8) Say 'JOBNAME='jbnm' JOBID='jbid' USERID='usid Maybe you can get from here. This is working code. On Thu, Feb 4, 2016 at 9:14 AM, Elardus Engelbrecht < elardus.engelbre...@sita.co.za> wrote: > Sankaranarayanan, Vignesh wrote: > > > >I'm looking to add a REXX logic to the beginning of an ad-hoc STC. > >Runs twice in an hour. Problem is, sometimes some instances just hang > around due to an XCOM issue. > >Yes, the *real* answer is to fix the XCOM issue but I'm just handing one > thing at a time. > > XCOM? Hmmm, smells like a TCP/IP and/or a firewall problem. > > >So my idea of handling this is to add a starting step to the STC that > does the following in REXX: > >1. Issue D A, > >2. Find if there are active instances, apart from itself > >3. Cancel all active instances (sometimes, I found instances from many > days ago just hanging around doing nothing) > >4. REXX exits cleanly so that a new instance runs > > Good. Point 2+3 will not work for your attempt. > > Check Mark Zelden's website for his REXX utility which lists ALL ASIDs > currently running. Using the output will help you to locate ALL the > instances and get rid of them. > > HTH! > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- "I am as you, in you, for you. One as you in all, as all, forever. My call is your call." -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Yup, I can understand that much! But my expertise is way too limited to even try to go chasing after memory addresses. – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: Thursday, February 04, 2016 12:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX Sankaranarayanan, Vignesh wrote: >Sorry, I don't understand. >I'm looking this up now, hoping it's not an assembler way! You use the REXX functions like C2D and STORAGE, etc. to chase those pointers. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Sankaranarayanan, Vignesh wrote: >I'm looking to add a REXX logic to the beginning of an ad-hoc STC. >Runs twice in an hour. Problem is, sometimes some instances just hang around >due to an XCOM issue. >Yes, the *real* answer is to fix the XCOM issue but I'm just handing one thing >at a time. XCOM? Hmmm, smells like a TCP/IP and/or a firewall problem. >So my idea of handling this is to add a starting step to the STC that does the >following in REXX: >1. Issue D A, >2. Find if there are active instances, apart from itself >3. Cancel all active instances (sometimes, I found instances from many days >ago just hanging around doing nothing) >4. REXX exits cleanly so that a new instance runs Good. Point 2+3 will not work for your attempt. Check Mark Zelden's website for his REXX utility which lists ALL ASIDs currently running. Using the output will help you to locate ALL the instances and get rid of them. HTH! Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Yup, I have a copy of Mark's program available. Was hoping to find a simpler/shorter block of code that would work :) 2+3 won't work... why? The XCOM bit works 99% of the time, there are just some times that it doesn't work. The next run that happens within half an hour goes OK, in most cases. – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: Thursday, February 04, 2016 1:15 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX Sankaranarayanan, Vignesh wrote: >I'm looking to add a REXX logic to the beginning of an ad-hoc STC. >Runs twice in an hour. Problem is, sometimes some instances just hang around >due to an XCOM issue. >Yes, the *real* answer is to fix the XCOM issue but I'm just handing one thing >at a time. XCOM? Hmmm, smells like a TCP/IP and/or a firewall problem. >So my idea of handling this is to add a starting step to the STC that does the >following in REXX: >1. Issue D A, >2. Find if there are active instances, apart from itself 3. Cancel all >active instances (sometimes, I found instances from many days ago just >hanging around doing nothing) 4. REXX exits cleanly so that a new >instance runs Good. Point 2+3 will not work for your attempt. Check Mark Zelden's website for his REXX utility which lists ALL ASIDs currently running. Using the output will help you to locate ALL the instances and get rid of them. HTH! Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Sankaranarayanan, Vignesh wrote: >Yup, I have a copy of Mark's program available. Was hoping to find a >simpler/shorter block of code that would work :) ;-D >2+3 won't work... why? Simply, because you initially said in your first post, if your program is running in batch, it should shows the ASID of itself. Same for your TSO session, it should says same for the TSO session. This will not work because you said ('Find if there are active instances, apart from itself ') later you want all instances to get rid of. Thus you need something to check all running ASIDs and then get rid of them. >The XCOM bit works 99% of the time, there are just some times that it doesn't >work. The next run that happens within half an hour goes OK, in most cases. If that is repeatable, you should check with the sysprogs and vendor. They can't make their problem yours... Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Maybe you could try this REXX with some adjustments: trace Off 'pipe MVS D A,CIC*', '! corrwait 5', '! sep', '! loc /A=/', '! stem result.' if result.0 > 0 then do i = 1 to result.0 say 'task:' word(result.i,1) 'asid:' word(result.i,6)=> this "6" might change end return With small enhancements, this would let you get the "MVS C taskname,A=" command issued --- *Lucas Rosalen* Emails: rosalen.lu...@gmail.com / *lrosa...@pl.ibm.com* LinkedIn: http://br.linkedin.com/in/lrosalen Phone: +48 792 809 198 2016-02-04 14:55 GMT+01:00 Elardus Engelbrecht < elardus.engelbre...@sita.co.za>: > Sankaranarayanan, Vignesh wrote: > > >Yup, I have a copy of Mark's program available. Was hoping to find a > simpler/shorter block of code that would work :) > > ;-D > > >2+3 won't work... why? > > Simply, because you initially said in your first post, if your program is > running in batch, it should shows the ASID of itself. Same for your TSO > session, it should says same for the TSO session. > > This will not work because you said ('Find if there are active instances, > apart from itself ') later you want all instances to get rid of. Thus you > need something to check all running ASIDs and then get rid of them. > > >The XCOM bit works 99% of the time, there are just some times that it > doesn't work. The next run that happens within half an hour goes OK, in > most cases. > > If that is repeatable, you should check with the sysprogs and vendor. They > can't make their problem yours... > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Vignesh: What Binyamin was telling you is that in the PSA (Prefixed Storage Area), there is a pointer to the current ASCB (Address Space Control Block). In that control block at the field named ASCBASID, you will find the ASID value you want. In either fashion, JOB or TSO/ISPF, this is the value you are after. In REXX, it's pretty simple and I could give you the two lines you want, but this is an opportunity to learn something. First, you ought to go to Mark Zelden's webpage (mzeldon.com/mvsutil.html) and download his iplinfo rexx procedure, which is a wonderful example of using REXX to search data in storage. Once you have it, browse or edit it and search for the first occurence of ASCB. You'll see a line that sets the variable ASCB from data located at location 224 in fixed storage, which is the storage address of the PSAAOLD field. Now you have the address of the ASCB. Next, you need to find where in the ASCB the ASID value is located. If you are goinf to want to play around with control blocks, you need to learn to interpret them and should be looking at the MVS Control Blocks manual that contains the ASCB layout. The manual is online, so layout you can look at it. When you do, find the ASCB and look for the ASCBASID field. get it's offset and add it to the value you got for ASCB. Using a similar REXX line as you see that gets the ASCB value, get your ASID. If you get this far and are still stuck, email me and I'll help you get further. Mike Myers Senior z/OS systems programmer and consultant Mentor Services Corporation 02/04/2016 07:54 AM, Elardus Engelbrecht wrote: Binyamin Dissen wrote: PSAAOLD->ASCB (ASCBASID) That chasing of the pointers should work. Vignesh wrote: :>If I'm running a REXX via a job, the output should be the ASID of the job. :>If I'm running a REXX via a ISPF, the output should be the ASID of my logon procedure. What do you want to do with that ASID? Perhaps there is a better solution or way to get this info. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
If you were not aware, there is a TSO REXX list that could also be very help in all things REXX. To join, if you have not done so, TSO REXXhttp://www2.marist.edu/htbin/wlvindex?TSO-REXX Lizette > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Sankaranarayanan, Vignesh > Sent: Thursday, February 04, 2016 6:00 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Yup, I can understand that much! But my expertise is way too limited to even > try to go chasing after memory addresses. > > – Vignesh > Mainframe Infrastructure > > -Original Message- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Elardus Engelbrecht > Sent: Thursday, February 04, 2016 12:56 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Obtaining current ASID in REXX > > Sankaranarayanan, Vignesh wrote: > > >Sorry, I don't understand. > >I'm looking this up now, hoping it's not an assembler way! > > You use the REXX functions like C2D and STORAGE, etc. to chase those pointers. > > Groete / Greetings > Elardus Engelbrecht > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, send email to > lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > MARKSANDSPENCER.COM > > Unless otherwise stated above: > Marks and Spencer plc > Registered Office: > Waterside House > 35 North Wharf Road > London > W2 1NW > > Registered No. 214436 in England and Wales. > > Telephone (020) 7935 4422 > Facsimile (020) 7487 2670 > > www.marksandspencer.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
I'm looking to add a REXX logic to the beginning of an ad-hoc STC. Runs twice in an hour. Problem is, sometimes some instances just hang around due to an XCOM issue. Yes, the *real* answer is to fix the XCOM issue but I'm just handing one thing at a time. So my idea of handling this is to add a starting step to the STC that does the following in REXX: 1. Issue D A, 2. Find if there are active instances, apart from itself 3. Cancel all active instances (sometimes, I found instances from many days ago just hanging around doing nothing) 4. REXX exits cleanly so that a new instance runs – Vignesh Mainframe Infrastructure -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: Thursday, February 04, 2016 12:54 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining current ASID in REXX Binyamin Dissen wrote: >PSAAOLD->ASCB (ASCBASID) That chasing of the pointers should work. Vignesh wrote: >:>If I'm running a REXX via a job, the output should be the ASID of the job. >:>If I'm running a REXX via a ISPF, the output should be the ASID of my logon >procedure. What do you want to do with that ASID? Perhaps there is a better solution or way to get this info. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining current ASID in REXX
Here is a little Rexx utility that I wrote to display a bunch of good stuff from the ASCB, including ASID in both hex and decimal. Mostly it was used to explore 522 timeout issues, but it shows some cool stuff, plus shows you one way to make your way through the control blocks. http://7cats.eu/downloads/d522.rexx.v3.05.txt It runs under ISPF. You just have to exec it. I put all the ISPF stuff inside the code as data. ;-) Kind regards, Lindy -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Sankaranarayanan, Vignesh Sent: torstaina 4. helmikuuta 2016 13.03 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Obtaining current ASID in REXX Hi folks, I'm looking for a piece of code in REXX to access the current ASID. I remember seeing this in one of the installation REXX'es that came with the BMC ICE for Control-M. I'm hoping that one of you has had to do this in the past and can help me out here. Ex: If I'm running a REXX via a job, the output should be the ASID of the job. If I'm running a REXX via a ISPF, the output should be the ASID of my logon procedure. Thank you! - Vignesh Mainframe Infrastructure MARKSANDSPENCER.COM Unless otherwise stated above: Marks and Spencer plc Registered Office: Waterside House 35 North Wharf Road London W2 1NW Registered No. 214436 in England and Wales. Telephone (020) 7935 4422 Facsimile (020) 7487 2670 www.marksandspencer.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN