View previous topic :: View next topic |
Author |
Message |
jas Beginner
Joined: 27 Jun 2005 Posts: 2 Topics: 1
|
Posted: Mon Jun 27, 2005 12:35 am Post subject: COBOL: dynamic call & program names |
|
|
Hello board,
I have gone through the threads which discussed about the difference between static & dynamic calls in COBOL. I have a question which was not covered in those threads.
In dynamic call: is the program name always contained in a variable or can it be passed through JCL? ( an interview question) If so, how?
Please excuse me if this is a dumb question.
Thanks in advance,
Jas |
|
Back to top |
|
|
Devi Beginner
Joined: 29 Oct 2004 Posts: 6 Topics: 3 Location: chennai
|
Posted: Mon Jun 27, 2005 2:14 am Post subject: |
|
|
hi jas
It is possible from jcl.by using PARM u can pass the value for the
varible,which will be used in Dynamic call. _________________ "A faithful friend is the medicine of life." |
|
Back to top |
|
|
jas Beginner
Joined: 27 Jun 2005 Posts: 2 Topics: 1
|
Posted: Mon Jun 27, 2005 11:07 am Post subject: COBOL: dynamic call & program names |
|
|
Devi,
Thanks for the quick answer |
|
Back to top |
|
|
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Mon Jun 27, 2005 2:01 pm Post subject: |
|
|
This could be done in any way that would allow you to put a valid program name into a variable. I have even systems where a data record contains a 4 digit number (transaction number). The main program reads this file, and appends the 4 digit code from the record on to a a constant, say TRAN.
It then calls that as a program name. So for example to process TRAN0001, the data record contains '0001' and the main program uses that to build the program name in storagage as TRAN0001, and then calls it
CALL TRANSACTION-PROCESSOR USING ...............
________
universal health |
|
Back to top |
|
|
|
|