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

Why Not we used Store Procedure in DB2 COBOL


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohan kumar panda

New User


Joined: 14 Sep 2007
Posts: 3
Location: india

PostPosted: Wed Jun 03, 2009 11:21 am
Reply with quote

I got a question in IBM interview that Why Not we used Store Procedure in DB2 COBOL. Please any one answer
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jun 03, 2009 11:23 am
Reply with quote

Please post in the correct forum. If this is an interview question - then use the interview questions forum.
Back to top
View user's profile Send private message
rohan kumar panda

New User


Joined: 14 Sep 2007
Posts: 3
Location: india

PostPosted: Wed Jun 03, 2009 11:23 am
Reply with quote

How can we execute a job forever. please any one answer this
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jun 03, 2009 11:25 am
Reply with quote

Also, the interview questions forum is for you to give answers and for the other forum members to let you know if you are correct or not. Please do not ask for answers without first telling us your answer, and if you do not have one, your thoughts on the topic.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed Jun 03, 2009 11:47 am
Reply with quote

Rohan,

1.
Quote:

Why Not we used Store Procedure in DB2 COBOL


Your question is not clear. We can write COBOL-DB2 stored procedures.

2.
Using TIME parameter, we can achieve. Refer the following statments.

Quote:

By coding TIME=1440 or TIME=NOLIMIT, It will give a job or step an unlimited amount of time.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 03, 2009 12:44 pm
Reply with quote

Quote:
By coding TIME=1440 or TIME=NOLIMIT, It will give a job or step an unlimited amount of time.
This is answer to an interview question so it can be accepted. And I believe to know about 1440 as a value for TIME parameter was the only concern of interviewer at the time of interview, but one should keep in mind that TIME=1440 should not be coded in practical situations.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed Jun 03, 2009 1:20 pm
Reply with quote

Anuj,

I just want to know more on below statement.

Quote:

This is answer to an interview question so it can be accepted. And I believe to know about 1440 as a value for TIME parameter was the only concern of interviewer at the time of interview, but one should keep in mind that TIME=1440 should not be coded in practical situations.


We code frequently TIME=1440 when JOB get abended with S322. Is there any particular reason to not to code in practical situations?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jun 03, 2009 1:34 pm
Reply with quote

Yes there is, what happens when your program goes into a loop. I have seen one instance when somone submitted a job on Friday and came back to work on the following Tuesday to find the job still running because it was looping. Just think about how much resource that idiot had wasted.

Talk to your systems programmers about job class and cpu entitlement to use the correct jobclass for higher cpu jobs.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 03, 2009 4:16 pm
Reply with quote

There had been a good discussion on this in the Forum -- please search the Forum on time parameter.
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: Wed Jun 03, 2009 7:34 pm
Reply with quote

Hello,

Quote:
We code frequently TIME=1440 when JOB get abended with S322.
Many well-managed systems automatically abend any batch job submitted with TIME=1440.

It causes far more problems that it cures.

IMHO, there is never a good reason to use 1440 for any batch application job. The code should be changed to reduce the amount of cpu needed or the job should be run in a class that supports more cpu time usage.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jun 04, 2009 12:53 pm
Reply with quote

I echo Dick -- at my shop, in test region, any user who submits a job with TIME=1440 gets this message:
Quote:
To help prevent run-away jobs, that are costly to this shop jobs with TIME= parameters larger than 180 minutes will be changed to 180 cpu minuteswith a message. Since 180 minutes is 3 hours of CPU time, most jobs require less time than 180 minutes. Code a smaller number.

Do not call up to say, " I don't understand, I code only MAXTIME or NOLIMIT. What is wrong." Those are above 180 CPU minutes.
and I love that text in bold ... icon_lol.gif
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top