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

Restart Option


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bobbynov201

New User


Joined: 06 Aug 2007
Posts: 12
Location: bangalore

PostPosted: Fri Apr 01, 2011 4:52 pm
Reply with quote

Hi,

I need help on RESTART Option. Could anyone please help/suggest me on this? Below is the query:

Suppose I have 10steps in a JCL, once all the steps are executed successfully the 11th step should be in such a way it has to go back and start at 1st step again. It should continue like that. I can stop the job, once the file is not present. So, please suggest me if anyone has worked on this any time.

STEP01, 02...... 10, STEP11(this should give a restart option of starting the job at STEP01 again).

Sunil.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Apr 01, 2011 4:55 pm
Reply with quote

From your description, what you want can not be achieved.

Please describe the required process in detail for us to try and understand the problem here, and possibly then be able to help you.
Back to top
View user's profile Send private message
bobbynov201

New User


Joined: 06 Aug 2007
Posts: 12
Location: bangalore

PostPosted: Fri Apr 01, 2011 5:03 pm
Reply with quote

Its basically a restart option at the last step to restart the job from first step again.

Usually a RESTART option is used in JOB CARD to start the job from a particular step. So, in the same way in the last step of the job I need to mention the RESTART Option to run the complete flow again.

So, is there any way that I can restart and execute the whole process again without rerunning the job again?


thanks,
Sunil.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Apr 01, 2011 5:08 pm
Reply with quote

I did ask you to describe the process that you wish to achieve. You mentioned something about a file no longer being present, please explain.

Explain exactly what it is that you are trying to do here, and maybe we can help.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Apr 01, 2011 5:10 pm
Reply with quote

Do you see in the documentation that RESTART is an EXEC card option? I do not think so.

Your comment
Quote:
usually ...
shows a lack of precise understanding. If our code/options/commands/etc. usually worked a certain way, we'd all be out of business.
Back to top
View user's profile Send private message
bobbynov201

New User


Joined: 06 Aug 2007
Posts: 12
Location: bangalore

PostPosted: Fri Apr 01, 2011 5:15 pm
Reply with quote

The job fetches a file from UNIX directory. Once this file is present in the UNIX directory, the mainframe job will be triggered. The first step is fetching the file from UNIX. So, this will be backed up on TAPE files. So, in the similar way there will be many number of files which will be fetched from this job itself.

So, I want the process to happen "N" number of times(this N depends on the files). But, this should be implemented in PROD in such a way there is only one job which handles "N" number of times. That if once the job starts execution, it should finish all the "N" files in single run.

Hope, this should be fine.

thanks,
Sunil.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 01, 2011 5:15 pm
Reply with quote

Quote:
So, is there any way that I can restart and execute the whole process again without rerunning the job again?
Absolutely, categorically -- NO.

Once a job is submitted, it executes from the first step to the last step, possibly omitting steps based on condition codes. JCL does not support looping in any fashion or form. You can resubmit the job to run it again, but you cannot go back and repeat a step that has already executed in the same job, period.

If you describe the process you are attempting to handle, we may have some suggestions. But having your JCL loop or run again without being resubmitted is not one of your options.
Back to top
View user's profile Send private message
bobbynov201

New User


Joined: 06 Aug 2007
Posts: 12
Location: bangalore

PostPosted: Fri Apr 01, 2011 5:19 pm
Reply with quote

Ok Sure, I will give you the whole process.

Thanks for this information.
Sunil.
Back to top
View user's profile Send private message
bobbynov201

New User


Joined: 06 Aug 2007
Posts: 12
Location: bangalore

PostPosted: Tue Apr 05, 2011 4:00 pm
Reply with quote

Hi,

Here is complete process. Our project is a Mainframes - ETL one.
We have a requirement of taking backup of data into mainframe files(preferrably tape files) from Datawarehouse Tables. The files will be present for many tables(say around 60tables) in the form of monthly data files i.e., it will contain 12 files for each table. And I have requested the team to place one more file which will have filelength,year,table name(EX: 2010TABLEXXX999)

I was able to code the JCL, so that it fetches the data from UNIX and takes backup with table/month/year suffixed in the Tape filename. These files will be placed in the UNIX directory with certain naming convention that is required for mainframe process.

But, this process is working out for one table for one run which will take one year's data backup. But, I want this to happen for all the tables for one year. I cannot code separate jobs, as the table might get added in future. And once the ETL script runs, mainframe job will be triggered and which inturn will have to trigger another ETL job.

So, I thought if there is an option of restarting the job if there is any way to go back and run for all the files and come out if the file is not present in the UNIX directory.


So, please let me know your views on this. Hope, this information should be enough.

Thanks,
Sunil.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 05, 2011 4:25 pm
Reply with quote

Quote:
Hope, this information should be enough.
Not anywhere near close enough.

Quote:
I was able to code the JCL, so that it fetches the data from UNIX
Fetch -- how? FTP? IND$FILE? Another file transfer method? -- and which one if another?

Quote:
filelength,year,table name(EX: 2010TABLEXXX999)
So 20 is file length, 10 the year, TABLEXXX999 the table name?

If you are using FTP, you can start your job by doing an FTP step that does a directory of the server, then pass that output in the next step to a program (REXX, SAS, PERL, COBOL, or whatever) that parses the directory list and extracts the file names you need to process, building as output the FTP commands to transfer these files, and the third step of the job then executes FTP again, using as input the FTP command file you bu8t in step 2.

There are other ways to do this, as well, but since you're partially describing your requirements there's no reason for us to get too detailed.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
No new posts INSYNC option with same function as I... JCL & VSAM 0
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
Search our Forums:

Back to Top