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
 

 

Is REXX/CLIST code can be written to capture data from SPOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sourabh jain

New User


Joined: 29 Feb 2008
Posts: 27
Location: Pune

PostPosted: Mon Apr 11, 2011 4:41 pm    Post subject: Is REXX/CLIST code can be written to capture data from SPOOL
Reply with quote

My requirement is to produce one report file from the mainframes SPOOL for some jobs that has been submitted taking the name of the jobs from an input file. The report file will contain the fields like job name, job id, max-RC status, start-time of the job and end-time of the job, if the job is present in the SPOOL.

Example:

Input file:
Job Name
ABC12345

Spool status (for the job in the input file):
Job Name Job ID Status (Start time of the job: 12.34.56)
ABC12345 ID123456 CC 0000 (End time of the job: 12.43.12)

Report file:
Job Name Job ID Status Start Time End Time
ABC12345 ID123456 CC 0000 12.34.56 12.43.12

Could you please let me know is it possible to create such a script using REXX or CLIST programming language?

Regards,
Sourabh
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: Mon Apr 11, 2011 4:43 pm    Post subject:
Reply with quote

Yes, it is possible and has been discussed many times in this forum.

Search for SDSF within the REXX forum.
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Wed May 18, 2011 11:35 am    Post subject:
Reply with quote

I think you'd better use C language to read SMF record.

It is not efficient to read SPOOL by SDSF REXX
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed May 18, 2011 7:50 pm    Post subject: Reply to: Is REXX/CLIST code can be written to capture data
Reply with quote

Quote:
I think you'd better use C language to read SMF record.

It is not efficient to read SPOOL by SDSF REXX


both replies are wrong icon_cool.gif

1) did You try it ?
much easier to do it in assembler, pl/i, rexx , even cobol probably

2) for what reason did IBM publish the redbook
http://www.redbooks.ibm.com/abstracts/sg247419.html
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu May 19, 2011 8:12 am    Post subject: Re: Reply to: Is REXX/CLIST code can be written to capture d
Reply with quote

enrico-sorichetti wrote:
Quote:
I think you'd better use C language to read SMF record.

It is not efficient to read SPOOL by SDSF REXX


both replies are wrong icon_cool.gif

1) did You try it ?
much easier to do it in assembler, pl/i, rexx , even cobol probably

2) for what reason did IBM publish the redbook
http://www.redbooks.ibm.com/abstracts/sg247419.html


Some misunderstanding icon_smile.gif

If you want to get more detailed information such as excuted time, historic job information,I think SMF record 30 is necessary.

then use C language reading smf record,once for ado.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu May 19, 2011 8:23 am    Post subject: Reply to: Is REXX/CLIST code can be written to capture data
Reply with quote

Quote:
My requirement is to produce one report file from the mainframes SPOOL
looking at the spool for job details is not a sin,
for long term job accounting/auditing is a completely different task
and I agree that SMF is the way to go
but it needs a more deep analysis of the whole shebang

most probably the TS was assigned this task, and he does not have any other choice

Quote:
then use C language reading smf record,once for ado.

again I ask did You try it/do it,
the advice is wrong because it tells the user to follow a long and windy road icon_biggrin.gif
You might be proficient in C so that the task might be easy for You,
not something to be tackled by somebody without a good C skill

when giving advice You should always keep in mind to give them according to the common practices
C language in a zOS environment is still a niche language, and it' s usage yet should not be spread until there is a strong programming experience using it.

there are around quite a bit of examples ready to run which process the SMF data
extracting lots of info for different view of what is going on in the system
most of them are available a www.cbttape.org

and, after all, the TS asked for a rexx solution, didn' he ? icon_biggrin.gif
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu May 19, 2011 8:57 am    Post subject:
Reply with quote

Hello,enrico

you are right,but deeper research can make us more happier.

Your words remind me of Alfredo of Nuovo cinema Paradiso.
thank you!
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu May 19, 2011 10:14 am    Post subject: Reply to: Is REXX/CLIST code can be written to capture data
Reply with quote

Follow on ... ( after a while I usually reread the topics I replied to icon_biggrin.gif )

Quote:
My requirement is to produce one report file from the mainframes SPOOL for some jobs that has been submitted taking the name of the jobs from an input file. The report file will contain the fields like job name, job id, max-RC status, start-time of the job and end-time of the job, if the job is present in the SPOOL.


what if... the job is not job the SPOOL ?
see my previous concern about full job accounting auditing using SMF

maybe the powers of Your organization need to define better the requirement
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu May 19, 2011 7:03 pm    Post subject: Reply to: Is REXX/CLIST code can be written to capture data
Reply with quote

In this case, the difficulty with the C language is that the SMF record mappings are in assembler format.

But I vaguely recall that the C compiler also provided a utility to build C structures from other control blocks. I mention it hoping to joggle somebody else's memory.
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Fri May 20, 2011 7:13 am    Post subject:
Reply with quote

C/C++ provides DSECT Conversion Utilitity(CCNEDSCT),which can convert ASM SECT to C structure.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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