Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to read JESYSMSG?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
neeharika

New User


Joined: 23 May 2008
Posts: 14
Location: Hyderabad

PostPosted: Thu Apr 30, 2009 4:26 pm    Post subject: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 30, 2009 4:40 pm    Post subject:
Reply with quote

You can use SDSF to copy from JES into a dataset, many many examples available on the forum.

Please search.
Back to top
View user's profile Send private message
neeharika

New User


Joined: 23 May 2008
Posts: 14
Location: Hyderabad

PostPosted: Thu Apr 30, 2009 4:46 pm    Post subject: Reply to: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 30, 2009 5:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 30, 2009 5:41 pm    Post subject:
Reply with quote

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
View user's profile Send private message
neeharika

New User


Joined: 23 May 2008
Posts: 14
Location: Hyderabad

PostPosted: Thu Apr 30, 2009 6:17 pm    Post subject: Reply to: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 30, 2009 6:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Thu Apr 30, 2009 8:51 pm    Post subject: Reply to: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Apr 30, 2009 10:02 pm    Post subject: Re: Reply to: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 01, 2009 12:20 am    Post subject: Reply to: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Fri May 01, 2009 12:35 am    Post subject:
Reply with quote

Sounds like Alice in Wonderland -- jam (delete) yesterday and jam (delete) tomorrow but never jam (delete) today! icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 01, 2009 1:02 am    Post subject:
Reply with quote

Nah, Robert surely you meant to mention Bob Marley

We're Jammin ............................................... icon_eek.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Fri May 01, 2009 1:04 am    Post subject:
Reply with quote

Hey, I thought I got it right ... maybe I need to go listen to the steel drums again?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri May 01, 2009 1:10 am    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri May 01, 2009 2:20 am    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri May 01, 2009 3:41 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 01, 2009 4:43 am    Post subject: Reply to: How to read JESYSMSG?
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts To read from Zeke scheduler p.anbuselvan CLIST & REXX 5 Thu Mar 31, 2016 1:13 am
No new posts How to read a excel sheet and load it... Radhika Nambiar Java & MQSeries 10 Wed Mar 30, 2016 4:49 pm
No new posts Read contents of PS file scorp_rahul23 JCL & VSAM 3 Mon Mar 28, 2016 10:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us