IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Apr 11, 2011 4:43 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed May 18, 2011 7:50 pm
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
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 19, 2011 8:23 am
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 Use [URL] BBCode for External Links

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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 19, 2011 10:14 am
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

Global Moderator


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

PostPosted: Thu May 19, 2011 7:03 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top