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 Usergroups Profile Log in to check your private messages Log in
 

 

submit one job after completion of another job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
pdighade

New User


Joined: 21 Jul 2008
Posts: 40
Location: pune

PostPosted: Sun Jan 11, 2009 11:51 am    Post subject: submit one job after completion of another job
Reply with quote

In my below rexx program i am creation 10 job based on different conditions.

I am having below questions

1: In the INDD , the name is passed in 'Dataset.cnt' by retriving the dataset name from and it's correspondoing volume serial no from tabel. Because the generation is present on tape we need to recall it by it's volume ser no . We are maintaining those info in our tabel . The question is sometime the dataset is stored on more than one volume so we need to recall them from all volumes so and those volumes i need to pass to 'Volser.cnt so how to pass all those volumes to this variale 'Volser.cnt
in one job? and i don't want any hardcoding like

VOL=SER='Volser.1' , 'Volser.2' ......


2: Below i am creating 10 jobs bust i want to submit the job as second job should get submitted after completion of first and third one should afetr completion of second..............

Please reply with some code or examples........


DO cnt = 1 TO 10

File# = cnt -1

Jclcard.1 = '//REPRO'||File# 'JOB ----------------------
Jclcard.2 = '// CLASS=5,MSGCLASS=A'
Jclcard.3 = '//REPRO EXEC PGM=IDCAMS'
Jclcard.4 = '//INDD DD DSN='Dataset.cnt',DISP=SHR,'
Jclcard.5 = '// UNIT=SYSSQ,VOL=SER='Volser.cnt
Jclcard.6 = '//SYSPRINT DD SYSOUT=*'
Jclcard.7 = '//SYSIN DD *'
Jclcard.8 = ' DELETE 'ABC.P.TL'File#'.REST -'
Jclcard.9 = ' CLUSTER PURGE'
Jclcard.10 = ' SET MAXCC = 00'
Jclcard.11 = ' DEFINE CLUSTER -'
Jclcard.12 = ' (NAME('ABC.P.TL'File#'.REST ) -'
Jclcard.13 = ' KEYS(21 0) -'
Jclcard.14 = ' RECORDSIZE(186 3139) -'
Jclcard.15 = ' SHAREOPTIONS(1 3) -'
Jclcard.16 = ' FREESPACE(0 0) -'
Jclcard.17 = ' NOIMBED -'
Jclcard.18 = ' NOREPLICATE -'
Jclcard.19 = ' REUSE -'
Jclcard.20 = ' STORAGECLASS(C) -'
Jclcard.21 = ' SPEED -'
Jclcard.22 = ' UNORDERED) -'
Jclcard.23 = ' DATA -'
Jclcard.24 = ' (NAME('ABC.P.TL'File#'.REST .DATA) -'
Jclcard.25 = ' CISZ(4096) -'
Jclcard.26 = ' CYL(233 233)) -'
Jclcard.27 = ' INDEX -'
Jclcard.28 = ' (NAME('ABC.P.TL'File#'.REST.INDEX) -'
Jclcard.29 = ' CYL(5 1))'
Jclcard.30 = " REPRO INFILE(INDD) OUTDATASET(ABC.P.TL'File#'.REST)"
IF Mode = 'TEST' THEN
DO loop = 1 TO 30
SAY Jclcard.loop
END
ELSE
DO
"NEWSTACK"
DO loop = 1 TO 30
QUEUE Jclcard.loop
END
QUEUE '$$'
"SUBMIT * END($$)"
"DELSTACK"
END
END
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sun Jan 11, 2009 3:14 pm    Post subject:
Reply with quote

Topic 1

Looks like bad design for the table, one entry per dataset with all volsers included would be the best bet.

Topic 2

This has been discussed to death on the forum, so obviously you did not search the topic.

It is generally froned upon to do what you are doing and the general concensus is to build the seperate jobs and then use the INTRDR as a medium for achieving your goal.

Have a search and see what I mean.
Back to top
View user's profile Send private message
pdighade

New User


Joined: 21 Jul 2008
Posts: 40
Location: pune

PostPosted: Sun Jan 11, 2009 11:40 pm    Post subject: Reply to: submit one job after completion of another job
Reply with quote

Topic 1:
How one column will have two volume serial no's? Please tell me things when situatiuon is like I have mantioned.

Topic 2: I have already serached the "sleep" word on this forum
i know it is not the good option to use . One should avoid using this option

My situation is ,IN my all ten job i am creating and copying required datasets and after CREATINO of these dataset ( afetr completion of thesae 10 jobs) i am am sending these dataset fom one host to anothe( through one job)
SO IF wrote separate job in one dataset tell me how can i achive my targer using INTRDR
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jan 12, 2009 1:37 am    Post subject:
Reply with quote

Topic 1

One ROW may have multiple vsn's as a field within a table

Topic 2

Look at the JCL reference manual for use of INTRDR
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Jan 12, 2009 10:28 pm    Post subject: Reply to: submit one job after completion of another job
Reply with quote

Quote:
IF wrote separate job in one dataset tell me how can i achive my targer using INTRDR


I think you can avoid writing to a dataset. Write to a DD name allocated to the internal reader:

Code:
//SYSUT2   DD SYSOUT=A,INTRDR),                                 
//       DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120),DEST=(LCLMVS3,LCLMVS2)
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm
No new posts Submit JCLs in one go zh_lad JCL & VSAM 6 Fri Jul 03, 2015 2:57 pm
No new posts Submit a Job through Rexx janmejay CLIST & REXX 10 Wed Jul 30, 2014 6:16 pm
No new posts Pass the value from panel to prog to ... jackzhang75 TSO/ISPF 1 Wed Jul 02, 2014 8:59 pm


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