View previous topic :: View next topic
|
Author |
Message |
neeharika
New User
Joined: 23 May 2008 Posts: 14 Location: Hyderabad
|
|
|
|
Hi,
We can get the corresponding library name and member name if we are executing our REXX code on the command line using the following ISPF edit commands in our REXX code.
Code: |
ADDRESS ISREDIT '(OPENDSN) = DATASET'
ADDRESS ISREDIT '(OPENMBR) = MEMBER' |
Then by viewing the dataset and member we can read the data.
Can someone tell me how can I get the data from the JESYSMSG into my REXX code.
Code: |
SDSF EDIT TBNEPANC (JOB07863) JESYSMSG Command ===>
000046 IGD104I BIOS.C006.INP.REWARDS.G0023V00
000047 IGD107I T.TBNEPAN.ADNS2VSA.REWARDS.G0001V00
000048 IEF285I TBNEPAN.TBNEPANC.JOB07863.D0000103.? |
Thanks,
Neeharika. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You can use SDSF to copy from JES into a dataset, many many examples available on the forum.
Please search. |
|
Back to top |
|
|
neeharika
New User
Joined: 23 May 2008 Posts: 14 Location: Hyderabad
|
|
|
|
Hi,
My intention is not copy the job from the spool into a dataset. I can use XDC to copy into a dataset.
But I want to execute a REXX utility by opening the job in edit mode i.e, by giving SE against it. I want to read the data from JESYSMSG into my REXX utility, when I execute that utility from the command line.
Thanks,
Neeharika. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Only available with z/OS 1.9 and above I believe.
Please search the IBM website - redbooks - for SDSF / REXX if your OS is compatible. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Neeharika,
Quote: |
But I want to execute a REXX utility by opening the job in edit mode i.e, by giving SE against it. I want to read the data from JESYSMSG into my REXX utility, when I execute that utility from the command line. |
what problem are you having?
once you have 'opened' anything into an ISPF EDIT/VIEW session, you can invoke your REXX Scripts. |
|
Back to top |
|
|
neeharika
New User
Joined: 23 May 2008 Posts: 14 Location: Hyderabad
|
|
|
|
Hi Dick,
Actually I would like to design a REXX utility to delete the GDG generations in case of resubmitting the job on the same day. This job will be part of my daily cycle.
So, I don't want to create another new generation on the same day just because I have resubmitted it.
We have CA11 utility which deletes the flat files. I would like to develop a REXX utility which deletes the GDG generations as well.
Code: |
SDSF EDIT TBNEPANC (JOB07863) JESYSMSG
Command ===> gdgclean
000046 IGD104I BIOS.C006.INP.REWARDS.G0023V00
000047 IGD107I T.TBNEPAN.ADNS2VSA.REWARDS.G0001V00
000048 IEF285I TBNEPAN.TBNEPANC.JOB07863.D0000103.? |
As shown above I want to go to JESYSMSG by giving SE and I would like to execute the utility 'GDGCLEAN'. For that I need to read the content in the JESYSMSG (in order to get the generation that has been created) in my REXX utility and I don't know how to do this.
Thanks,
Neeharika. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Neeharika,
do not miss-interpret my comments as support for your endevor.
I can not believe that CA-7 & 11 do not delete gdg's.
why? because that is IBM's answer to files with dates as part of the dsn.
CA7/11 are written (in part) by ex-ibmers that understand the gdg concept,
and I can not believe that their product does not handle it.
I know nothing of CA7/11 (or enough to say how it is done),
but that is a nice thing about this website -
there are enough contributors to insure a knowledge gap does not exist.
now that you have explained your goal, I am sure there will be posts suggesting solutions.
as far as how to do what you want with your rexx macro,
you would FIND lines that have the info that you want,
LINE the data into your scripts storage,
construct the necessary JCL
submit the job. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Quote: |
by giving SE against it. I want to read the data from JESYSMSG into my REXX utility, when I execute that utility from the command line. |
What you are describing is an ISPF editor macro. Study chapter 5 and chapter 6 of 'Edit and Edit macros' from the ISPF library. Some of the examples there are CLIST, but I recommend you concentrate on the rexx examples. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
neeharika wrote: |
Actually I would like to design a REXX utility to delete the GDG generations in case of resubmitting the job on the same day. |
Out of curiosity - a job can have multiple GDGs (GDS), some of them may be used just as input and so no "next generation" at the end of job; there may be other GDGs which might be used "multiple times" and so the "final generation" can be "many numbers ahead" then the "zeroth" generation . . . how do you decide which one to delete? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
how do you decide which one to delete? |
[humor on] Perhaps the job may only be run on PsychicDay - which varies from week-to-week and month-to-month. . .[humor off] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Sounds like Alice in Wonderland -- jam (delete) yesterday and jam (delete) tomorrow but never jam (delete) today! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Nah, Robert surely you meant to mention Bob Marley
We're Jammin ............................................... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Hey, I thought I got it right ... maybe I need to go listen to the steel drums again? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Actually, once upon a time I was also trying to create a similar "tool"; and these type of tools are supposed to be of "generic" nature. Given the job name and tool should be able to delete the respective "latest" generations . . . I'm pretty sure that idea behind this tool is "if any job gets abended " delete "all" the GDGs created in that "bad run" even if some GDG is updated multiple times. If it was for a single job, might be I could succeed by preparing a list of all GDGs in that job but then it was not of generic nature . . . |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
dbzTHEdinosauer wrote: |
I can not believe that CA-7 & 11 do not delete gdg's. |
The CA-11 user manual says:
Quote: |
All simple (non-GDG) data sets whose first DD reference is with DISP=NEW are uncataloged and also are scratched if on disk. This action prevents NOT CATLGD 2 situations. This catalog and data set maintenance is not performed on data sets which are exempted from it by the CA-11 user exits, U11RDSEX or U11UCSEX, or the CA-11 Volume Include/Exclude List. |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Anuj,
[start of opinion and fact]
That is what is 'out-of-the-box'.
What that means is if you want to deal with gdg's,
you need to tailor the CA definition of each JOB.
I know for a fact that at several of the sites that I have worked,
which had trained and competent CA users in operations
- user exit implementation,
-detailed JOB definition parameterized (yes i know, misspelled the word) ,
we never had to have REXX Tools like this thread has discussed.
Unfortunately almost every JOB is a little different.
To write a generic REXX Tool, I believe is going to bite you in the ass, eventually.
To make the Tool effective, there will be required more and more specialized - job dependent - code.
Which is what a sophisticated scheduling system can be tailored to do.
Now, if the OP/TS works at one of the cheapie-sites that write their own scheduling system,
the requirement for this REXX Tool is understood.
But if the OP/TS's site has already invested in a scheduler
(and they are not cheap)
they are better off learning how to master their bought-and-paid-for Tool
instead of writing a quick and dirty all purpose REXX.
When one considers the rather lengthy experience of most of the contributors to this thread have,
the basic (negative) theme has been:
every JOB is different - so define and control in one place - the scheduler.
[end of opinion and fact] |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
every JOB is different - so define and control in one place - the scheduler. |
As the over-the-roaders say "That's a big 10-4, good buddy".
d |
|
Back to top |
|
|
|