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

Run a simple JOB as Started Task


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
newroad

New User


Joined: 30 Oct 2015
Posts: 8
Location: India

PostPosted: Wed Nov 23, 2022 1:10 pm
Reply with quote

I wish to test a vulnerability & need to know if I can run a job with a basic RACF command as an started task if I place this job in say SYS1.PROCLIB & then start the job as started task. And if I can do this will the RACF command execute if the Started task id assigned to the task has the required RACF authority.

Apparently I plan to perform this in a test environment.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Nov 23, 2022 2:05 pm
Reply with quote

sure.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Nov 23, 2022 6:54 pm
Reply with quote

To clarify: Yes you can have a job in a proclib and start it, it then becomes what is known as a started job. Some job statement parameters are ignored, like jobclass. But it allows things like JCLLIB statements. Obviously you cannot use it as a normal procedure with EXEC name.
And you must define it to the STARTED class in RACF.
Perhaps another approach can be used. Create a proc JOB like this:
Code:
//JOB     PROC DS=your.joblib,M= 
//JOB     EXEC PGM=IEBGENER             
//SYSPRINT DD DUMMY                     
//SYSIN    DD DUMMY                     
//SYSUT1   DD DISP=SHR,DSN=&DS(&M)       
//SYSUT2   DD SYSOUT=(,INTRDR)

Then you do a S JOB,M= the membername where you have your job. That way you only have to define the JOB started task to RACF, not whatever job you want to run that way. This of course assumes that user inheritance is active.
You might want to hardcode the joblib name for security reasons, otherwise anyone who can do a START command can run a possible authorized job from their own library.
Back to top
View user's profile Send private message
newroad

New User


Joined: 30 Oct 2015
Posts: 8
Location: India

PostPosted: Fri Nov 25, 2022 10:04 am
Reply with quote

Hi Wiley,
Thank you for your response.

I figured that I can do the test with a PROC too. I tried to start the PROC as started task instead of a JOB. I created a member named T12345T in SYS4.PROCLIB as below:

//T12345T PROC
//T12345T EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ALU AB12345 NAME('TEST')
//

Am I doing something wrong here?

And it's throwing JCL error when I try to do /S T12345T. Which is possibly because of something which is not allowed in a PROC as you said (use of EXEC) or something else.


I'm not sure how the alternate approach you suggested (for JOB) will work.

I don't understand what is DS=your.joblib & what is M=

If I specify my personaly joblib & member outside of the PROCLIBS, how will it start the Started task? As far as I know I can only start PROC as a started task if it is inside of one of the designated PROCLIBS?
Back to top
View user's profile Send private message
newroad

New User


Joined: 30 Oct 2015
Posts: 8
Location: India

PostPosted: Fri Nov 25, 2022 10:55 am
Reply with quote

Please ignore the above message. I was able to run the started task.

On to my test now.

Thanks for your help.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Batch call online program, EXCI task ... CICS 3
No new posts Started transaction enters "firs... CICS 3
No new posts How to specify TCBLIMIT for DB2CONN i... CICS 3
No new posts CKTI not started in CICS 5.4 CICS 13
Search our Forums:

Back to Top