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

How to capture the userid of the user who submits the job


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
reachsudheer

New User


Joined: 23 Apr 2007
Posts: 2
Location: chennai

PostPosted: Thu Aug 14, 2008 1:07 pm
Reply with quote

Hi,

I need to capture the mainframe userid of the user who submits the cobol program to display in the report.

JOB A
PGM B
USER user1
USER user1

JOB A executes the PGM B and if USER user1 submits the job,
prgoram PGMB should capture user1 and write in my report in the program dynamically, if USER use2 submits then user2 should be written in my report .

Thanks & Regards
Sudheer
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 14, 2008 1:16 pm
Reply with quote

Why reinvent the wheel ?

The system should already have this information stored in the SMF type30 records. Make sure that these are captured with the systems programmers, and the data is already available without you having to capture what has already been captured.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 14, 2008 1:27 pm
Reply with quote

wouldn't accessing the SMF type 30 record be an 'after the job ran' type of thing? I don't know, just asking.

this kind of silliness could be also accomplished by the proper construction of jcl to provide(generate with a set? )a parm to the step, that would be dependent upon the userid symbolic. or can not the <userid> symbolic that one can put in the notify= job card (I don't mean the actual userid, I mean the symbolic that resolves to the userid.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 14, 2008 1:39 pm
Reply with quote

Yes, &SYSUID would do it.

But I guess it depends on what the info is required for. If it is for perf & capacity, billing, or what - the information remains the same where ever the source is.

As for after the event, I really can't see what the difference is, the report will still be the same...................... won't it ?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Aug 14, 2008 2:32 pm
Reply with quote

PARM=&SYSUID

works well
Back to top
View user's profile Send private message
reachsudheer

New User


Joined: 23 Apr 2007
Posts: 2
Location: chennai

PostPosted: Thu Aug 14, 2008 2:45 pm
Reply with quote

This job will be submitted many users so when ever any user submits the job it will generate a report.

Idea is that if we can capture the Userid from cobol we can write the userid in the report.

regards
Sudheer
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 14, 2008 2:58 pm
Reply with quote

OK, the obvious question is why are these statistics wanted.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Aug 14, 2008 3:55 pm
Reply with quote

Hi,
reachsudheer wrote:
.. who submits the cobol program to display in the report.
Probably you wanted to say, some JCL/JOB was SUBmitted..

Quote:
JOB A executes the PGM B and if USER user1 submits the job,
prgoram PGMB should capture user1 and write in my report in the program dynamically, if USER use2 submits then user2 should be written in my report .
It's quite a strange requirement, again, once 'captured', how "all this" would be used..? Can "EZACFSM1" be your choice..
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts user exit in IBM Infosphere Optim DB2 8
No new posts Running a Job with the Default User ID JCL & VSAM 2
No new posts Rexx to capture output from TSO HSEND... CLIST & REXX 9
Search our Forums:

Back to Top