MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cancel jobs using SDSF batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Thu Feb 21, 2019 11:25 am    Post subject: cancel jobs using SDSF batch Reply with quote

Hi all,
Is it possible to cancel a set of executing jobs using SDSF Batch?
For ex: I want to cancel all the jobs with job name ACLA2*D

Thanks,
Vijay
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Thu Feb 21, 2019 2:57 pm    Post subject: Reply with quote

vijay,

What do you mean CANCEL? Like the jobs are running and you want to stop the execution of the jobs? or or just remove the job logs from your SDSF held queue?

Assuming you are authorized to issue CANCEL command, you can try this to issue a block command to C to cancel the jobs in DA queue

Here is the jcl

Code:

//**************************************************************
//* DELETE IF OUTPUT DATASET EXISTS                            *
//**************************************************************
//STEP0100 EXEC PGM=IEFBR14                                     
//DD01     DD  DSN=&SYSUID..SDSF.OUTPUT,                       
//             DISP=(MOD,DELETE),UNIT=SYSDA,                   
//             SPACE=(TRK,(1,0),RLSE)                           
//*                                                             
//**************************************************************
//* CANCEL ALL JOBS IN DA FOR PREFIX 'ACLA2*'                  *
//* USING SDSF BLOCK COMMANDS (//C - //)                       *
//**************************************************************
//STEP0200 EXEC PGM=SDSF,PARM='++30,256'                       
//ISFOUT   DD SYSOUT=*                                         
//SYSUDUMP DD SYSOUT=*                                         
//SYSPRINT DD SYSOUT=*                                         
//SYSTSPRT DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                         
//DATAOUT  DD DSN=&SYSUID..SDSF.OUTPUT,                         
//            DISP=(NEW,CATLG,DELETE),                         
//            SPACE=(CYL,(25,25),RLSE),                         
//            RECFM=FB,LRECL=133,BLKSIZE=0                     
//ISFIN    DD *       
PRE ACLA2*         
DA                   
PRINT FILE DATAOUT   
FIND 'ACLA2*D'         
++//C                 
FIND 'ACLA2*D' LAST   
++//                 
PRINT CLOSE           
END                   
/*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group