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 Profile Log in to check your private messages Log in
 
Need to run 2 JOBS FOR 255 TIMES

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vrakeshmbt

New User


Joined: 17 Aug 2005
Posts: 30

PostPosted: Fri Feb 03, 2006 3:30 pm    Post subject: Need to run 2 JOBS FOR 255 TIMES
Reply with quote

Hi All,

I want to run 2 jobs say A and B for 255 times each. And I have to Run these one after the other. How can I do this.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Feb 03, 2006 4:29 pm    Post subject: Re: Need to run 2 JOBS FOR 255 TIMES
Reply with quote

Run JOBA. At the end of JOBA, have it SUBMIT JOBB. At the end of JOBB, have it SUBMIT JOBA. You will, of course, have to create a counter program to track the total number of submissions, and to stop the SUBMIT process after it reaches 255.
Back to top
View user's profile Send private message
vrakeshmbt

New User


Joined: 17 Aug 2005
Posts: 30

PostPosted: Fri Feb 03, 2006 4:44 pm    Post subject: Re: Need to run 2 JOBS FOR 255 TIMES
Reply with quote

Superk,

Can U plz suggest how can I implement counter.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Fri Feb 03, 2006 5:47 pm    Post subject:
Reply with quote

Create a file or member in PDS, store the counter and the next day read it, increase it.......and so on.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Feb 03, 2006 7:19 pm    Post subject:
Reply with quote

Here is a REXX solution:

Code:
/* REXX */

DO I = 1 TO 255
  ADDRESS TSO "SUBMIT 'my.pds(joba)'"
  ADDRESS TSO "SUBMIT 'my.pds(jobb)'"
END

EXIT


O.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Feb 03, 2006 7:26 pm    Post subject: Re: Need to run 2 JOBS FOR 255 TIMES
Reply with quote

I was thinking of something relatively easy, such as adding a dummy record to a control dataset for each run, then checking for the record counts of the control datasets:

JOBA:
Code:

//JOBA JOB ...
//*
//STEP0001 EXEC PGM=IEBGENER                                   
//SYSUT1   DD   *                                               
NOTHING                                                         
/*                                                             
//SYSUT2   DD   DSN=&SYSUID..LOOPCTL.A,DISP=(MOD,CATLG,CATLG), 
//         UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)                   
//SYSPRINT DD   SYSOUT=*                                       
//SYSIN    DD   DUMMY                                           
//*                                                             
//STEP0002 EXEC PGM=IDCAMS                                     
//IN       DD   DSN=&SYSUID..LOOPCTL.A,DISP=SHR                 
//OUT      DD   DUMMY,RECFM=FB,LRECL=80                         
//SYSPRINT DD   SYSOUT=*                                       
//SYSIN    DD   *                                               
  REPRO IFILE(IN) OFILE(OUT) REUSE COUNT(255)                     
/*                                                             
//*                                                             
// IF (STEP0002.RC > 0) THEN                                   
//STEPnnnn EXEC JOB A's STUFF
// ENDIF                                                       
//*                                         
//STEP9999 EXEC PGM=IKJEFT01               
//SYSTSPRT DD   SYSOUT=*                   
//SYSTSIN  DD   *                           
SUBMIT JCL(TEST339B)                       
/*                                         
//*                                         


JOBB:
Code:

//JOBB JOB ...
//*
//STEP0001 EXEC PGM=IEBGENER                                           
//SYSUT1   DD   *                                                       
NOTHING                                                                 
/*                                                                     
//SYSUT2   DD   DSN=&SYSUID..LOOPCTL.B,DISP=(MOD,CATLG,CATLG),         
//         UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)                           
//SYSPRINT DD   SYSOUT=*                                               
//SYSIN    DD   DUMMY                                                   
//*                                                                     
//STEP0002 EXEC PGM=IDCAMS                                             
//IN       DD   DSN=&SYSUID..LOOPCTL.A,DISP=SHR                         
//OUT      DD   DUMMY,RECFM=FB,LRECL=80                                 
//SYSPRINT DD   SYSOUT=*                                               
//SYSIN    DD   *                                                       
  REPRO IFILE(IN) OFILE(OUT) REUSE COUNT(255)                             
/*                                                                     
//*                                                         
//STEP0003 EXEC PGM=IDCAMS                                 
//IN       DD   DSN=&SYSUID..LOOPCTL.B,DISP=SHR             
//OUT      DD   DUMMY,RECFM=FB,LRECL=80                     
//SYSPRINT DD   SYSOUT=*                                   
//SYSIN    DD   *                                           
  REPRO IFILE(IN) OFILE(OUT) REUSE COUNT(255)                 
/*                                                         
//*                                                         
// IF (STEP0003.RC > 0) THEN                               
//STEPnnnn EXEC JOB B's STUFF                             
// ENDIF                                                   
//*                                                         
// IF (STEP0002.RC > 0) THEN                               
//STEP9999 EXEC PGM=IKJEFT01                               
//SYSTSPRT DD   SYSOUT=*                                   
//SYSTSIN  DD   *                                           
SUBMIT JCL(TEST339A)                                       
/*                                                         
// ENDIF                                                   
//*
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 121
Location: Tadepalligudem

PostPosted: Tue Feb 07, 2006 10:20 am    Post subject:
Reply with quote

Hi,

Try this.......

Code:

JCL TO BE SUBMITTED.....
//STEP1 EXEC PGM=CBLPGM
//DD1    DD    DSN=TEST.PDS,DISP=SHR
//JCLDD DD    SYSOUT=(*,INTRDR)

CBLPGM:-
IN ENVIRONMENT DIVISION....
SELECT  JCLFILE ASSIGN TO JCLDD
FILE SECTION.
FD JCLFILE.
01 JCL-REC PIC X(80).
.
.
PROCEDURE DIVISION.

  PERFORM 255 TIMES
     OPEN OUTPUT JCLFILE
     MOVE '//STEP2 EXEC PGM=IKJEFT01,PARM=' '' TO JCL-REC
     WRITE JCL-REC
     MOVE '//SYSPRINT DD SYSOUT=*' TO JCL-REC
     WRITE JCL-REC
     MOVE '//SYSTSIN DD *' TO JCL-REC
     WRITE JCL-REC
     MOVE 'PROF PREFIX(USERID)' TO JCL-REC
     WRITE JCL-REC
     MOVE 'SUBMIT 'JCL1'' TO JCL-REC
     WRITE JCL-REC
     MOVE 'SUBMIT 'JCL2'' TO JCL-REC
     WRITE JCL-REC
     MOVE '/*' TO JCL-REC
     WRITE JCL-REC
     CLOSE JCLFILE
  END-PERFORM.


this might work.....

corrections welcomed...

Thanks,
Rajesh
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 121
Location: Tadepalligudem

PostPosted: Tue Feb 07, 2006 10:42 am    Post subject:
Reply with quote

hi superk,

tell me whether the above one is correct or not......

Thanks,
Rajesh
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 4 Tue Sep 19, 2017 1:39 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts self-restarting jobs in OPC jzhardy IBM Tools 1 Mon Aug 21, 2017 10:15 am
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Determine Region with max bandwidth f... seahawk789 COBOL Programming 3 Mon Feb 27, 2017 8:26 pm

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