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

submitting the JCL thru internal reader.


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

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Thu Aug 28, 2008 8:11 pm
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
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Aug 28, 2008 8:19 pm
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

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Thu Aug 28, 2008 8:23 pm
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

Global Moderator


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

PostPosted: Thu Aug 28, 2008 10:20 pm
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

Global Moderator


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

PostPosted: Thu Aug 28, 2008 10:52 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 29, 2008 1:46 am
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: 8797
Location: Welsh Wales

PostPosted: Fri Aug 29, 2008 11:58 am
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

Global Moderator


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

PostPosted: Fri Aug 29, 2008 9:30 pm
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

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Sat Aug 30, 2008 4:18 am
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Aug 30, 2008 4:43 am
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

Global Moderator


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

PostPosted: Sat Aug 30, 2008 4:54 am
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

Global Moderator


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

PostPosted: Sat Aug 30, 2008 5:06 am
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: 8797
Location: Welsh Wales

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

AAARRRGGGGHHHHHHHH!!!!
Please add mine to the one expressed above
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 submitting feedback for manuals All Other Mainframe Topics 3
No new posts Search substring in internal table of... COBOL Programming 2
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
No new posts Getting error S000 U0016 (Cn Internal... JCL & VSAM 4
No new posts "Output" internal table (OD... COBOL Programming 0
Search our Forums:

Back to Top