Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
submitting the JCL thru internal reader.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
arvind.m

New User


Joined: 28 Aug 2008
Posts: 11
Location: Hyderabad

PostPosted: Thu Aug 28, 2008 8:11 pm    Post subject: submitting the JCL thru internal reader.
Reply with quote

Hi all,

i have a jcl which has four steps.

STEP1: submit a job XXXX thru internal reader which using dpsdsng.test file as input.

STEP2: ignore

STEP3: this step will execute a program which will use the same input file dpsdsng.test.

STEP4: ignore

now the problem is, by the time XXXX is completed STEP3 in the main job is getting executed. since both job XXXX and STEP3 is using the same input file the main job is getting abended.


so my question is:
1. is there any jcl statement to chek the execution of job xxxx and execute STEP3 or

2. or delaying only STEP3 for certain time will also do.

thanks,
Back to top
View user's profile Send private message
References
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 710
Location: Chennai, India

PostPosted: Thu Aug 28, 2008 8:19 pm    Post subject:
Reply with quote

Arvind,

How about Adding STEP3 as the last step in the job XXXX OR splitting the main job into two separate jobs?

Thanks
Arun
Back to top
View user's profile Send private message
arvind.m

New User


Joined: 28 Aug 2008
Posts: 11
Location: Hyderabad

PostPosted: Thu Aug 28, 2008 8:23 pm    Post subject:
Reply with quote

yes. spliting of job will do. but i would avoid splitting of jobs.

Quote:

How about Adding STEP3 as the last step in the job XXXX

in my job that is not possible to do. i think delaying the execution for certail time will do but i don't have enough info or jcl syntax which does this!
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 510
Location: work

PostPosted: Thu Aug 28, 2008 10:20 pm    Post subject: Reply to: submitting the JCL thru internal reader.
Reply with quote

When we have jobs with resource contention, we solve that by submitting to a 'single thread initiator'. For example, we specify CLASS=Q in the job card and there is only one initiator defined to pick up class Q. Only one such job can run at one time. Therefore, contention at the initiator level, but no contention at the dataset level.
Back to top
View user's profile Send private message
Robert Sample

Senior Member


Joined: 06 Jun 2008
Posts: 891
Location: Atlanta, GA

PostPosted: Thu Aug 28, 2008 10:52 pm    Post subject:
Reply with quote

Pedro, the O/P stated the first step of the job submits job XXXX which then runs in parallel with step 2 of the job. Step 3 is starting while XXXX is using the data set causing the job to abend (why is not clear -- jobs can share INPUT files usually without problem). So your single thread initiator solution won't work when the jobs both have to run.

Unless ... the job can complete BEFORE job XXXX starts up?
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8643
Location: 221 B Baker St

PostPosted: Fri Aug 29, 2008 1:46 am    Post subject:
Reply with quote

Hello,

If the design cannot be improved (having the job submit a "conflicting" job as the first step is rather poor) and the volume of data in dpsdsng.test is not large, a copy of the file might be made so xxxx would not need the same file.

If this is a dasd file and both processes read the file, disp=shr might get around the contention - there could be a considerable performance hit.

Is there some reason that the xxxx job could not be scheduled as a successor of "this" job? I question the need to run in parallel. . . icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3509
Location: Brussels once more ...

PostPosted: Fri Aug 29, 2008 11:58 am    Post subject:
Reply with quote

Yes, to carry on from the comment by Dick,

You have told us absolutely nothing of any real value to resolve the problem.

What is the media
If DASD, dataset DSORG is .......
What do the programs do in each job, read or update
There should be no problems in sharing the file if everything is set up correctly.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 510
Location: work

PostPosted: Fri Aug 29, 2008 9:30 pm    Post subject: Reply to: submitting the JCL thru internal reader.
Reply with quote

Quote:
the O/P stated the first step of the job submits job XXXX which then runs in parallel with step 2 of the job

The original post stated the situation, but I do not think parallelism was stated as a requirement, more of 'this is how it is working today'. But how it is working does not.
Back to top
View user's profile Send private message
arvind.m

New User


Joined: 28 Aug 2008
Posts: 11
Location: Hyderabad

PostPosted: Sat Aug 30, 2008 4:18 am    Post subject:
Reply with quote

Hi expat,
i'll answer to your questions.

Quote:

What is the media

media??
Quote:

If DASD, dataset DSORG is .......

DASD
Quote:

What do the programs do in each job, read or update

the job submitted thru internal reader will delete the dataset. and the main job at STEP3 will create the same dataset as output.

so here is the problem. Before the job which was submitted thru internal reader is executed the STEP3 is also executed causing an abend.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8643
Location: 221 B Baker St

PostPosted: Sat Aug 30, 2008 4:43 am    Post subject:
Reply with quote

Hello,

Quote:
i'll answer to your questions.
Please understand that this is for learning. . . Those replies did not answer the questions. There is surely a lack of communication and/or understanding. If you are patient, this should be helpful for more than this one job. . .

From earlier:

Media - the type of device the data is stored on
DSORG - dataset organization (i.e. qsam, partitioned dataset, vsam, etc)

In additon to deleting the dataset, what else is accomplished by the internal reader job?

Quote:
so here is the problem.
Sorry, but no. The problem is the design. . .

Why does the job submitted in step one need to run via the internal reader? What might be done with a submitted job rather than running the same process inline?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 510
Location: work

PostPosted: Sat Aug 30, 2008 4:54 am    Post subject: Reply to: submitting the JCL thru internal reader.
Reply with quote

Earlier you said the file was used for input in both jobs...
Quote:

STEP1: submit a job XXXX thru internal reader which using dpsdsng.test file as input.

STEP3: this step will execute a program which will use the same input file dpsdsng.test.

You forgot the important fact that one job deletes the file. This kind of mis-statement of the problem is maddening to those trying to help you.

Dick said:
Quote:
The problem is the design. . .

Agreed.

You delete a file while it is still needed. Why would you ever expect such a design to work. It should be deleted AFTER it is no longer needed. As you will eventually figure out, it is not possible to coordinate such an use of the dataset in separate batch jobs.
Back to top
View user's profile Send private message
Robert Sample

Senior Member


Joined: 06 Jun 2008
Posts: 891
Location: Atlanta, GA

PostPosted: Sat Aug 30, 2008 5:06 am    Post subject:
Reply with quote

Quote:
You forgot the important fact that one job deletes the file. This kind of mis-statement of the problem is maddening to those trying to help you.
AAARRRGGGGHHHHHHHH!!!!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3509
Location: Brussels once more ...

PostPosted: Sat Aug 30, 2008 4:34 pm    Post subject:
Reply with quote

AAARRRGGGGHHHHHHHH!!!!
Please add mine to the one expressed above
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1