View previous topic :: View next topic
|
Author |
Message |
guruji Warnings : 1 New User
Joined: 13 Apr 2007 Posts: 59 Location: Chennai
|
|
|
|
Hello,
May I know what's the maximum number of I/O PCBs that can be coded and used in a COBOL program? It's a question I was asked in one of the interviews.
Thanks,
Reni. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Assuming Enterprise COBOL, ( 128MB divided by length of IO PCB ) multiplied by three.
The trick may be that you need a little bit of extra storage for other data. Get around that by saying "it's in the LINKAGE SECTION".
I'm sure it is an absurd question. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Bill,
Just curious : What would interviewer gain from knowing it? |
|
Back to top |
|
|
guruji Warnings : 1 New User
Joined: 13 Apr 2007 Posts: 59 Location: Chennai
|
|
|
|
Exactly Pandora!
It was the same question even in mind when I heard about that question.
Reni. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It depends how you phrase the answer: the interviewer thinks/believes the question has meaning in itself. I suspect the question should be something like "how many PCBs can whatever PCBs are used by have open at one time?".
The COBOL in the question is a Red Herring. Perhaps it is a "dumb" question to gauge response. Perhaps it is just a dumb question that the interviewer has no clue about.
It should be answered as the first (ie don't give my answer and leave it at that). |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
The term 'IO-PCB' is from IMS, not COBOL.
Like all PCBs, they are defined in the PSB, and have to match the ENTRY statement.
I've never seen a program with more than one, and some batch programs don't even have one. Online programs have to have one.
This 'IO-PCB' is the special connection between the program and the IMS region. It's where the messages, spa area and screen images come in. You can define 'alternate' output points for messages, but they are not really 'IO-PCBs.' |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
In our shop the standard is to use the AIBTDLI interface so that we do not have to worry about listing the PCBs in the ENTRY statement. As an old-timer I was accustomed to the older approach, but AIBTDLI is an innovation that I wholeheartedly endorse. (*Innnovation; AIBTDLI has been around for at least 20 years, but it still seems new to me) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I've some marks for interviewer here - though not too much, but this question is not that badly posed than what I've faced! I was once asked - what is the difference between CATLOG and KEEP in DISP?
Well, the verbiage was that much only - no less no more. I asked are you asking about a NEW data-set? The question was repeated.
I said - they are "same" if you are on an SMS site and "not same" if you are on non-SMS site. But these days mostly all the sites are SMS managed.
Confused with my answer, he asked what is SMS and started looking at his cell phone SMS with a killing look. Explanation about SMS was useless, and we agreed on that with KEEP you'd need volume serial number (SMS/non-SMS was out of question by now)!
The point is - perhaps, some time you need to tell them what they want to listen and not what you know!
Back to the original question of this thread - the answer should have been "one"!
In an I/O PCB mask you'll have default "Logical Terminal Name", this is the name of the terminal that sent the message. When your program retrieves an input message, IMS places the name of the logical terminal that sent the message in this field. When you want to send a message back to this terminal, you refer to the I/O PCB when you issue the ISRT call, and IMS takes the name of the logical terminal from the I/O PCB as the destination. If you want to send a response to a terminal different from where it was originated, as Ed said, you use Alternate PCB mask - and they can be many* -- but they are not I/O PCBs, that's only one!
*: AFAICR, in a PSB you can have 2500 PCBs in all. |
|
Back to top |
|
|
|