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

Maximum number of I/O PCBs in a COBOL Program.


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Mon Nov 18, 2013 11:25 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 18, 2013 12:39 pm
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Nov 18, 2013 12:53 pm
Reply with quote

Bill,

Just curious : What would interviewer gain from knowing it?
Back to top
View user's profile Send private message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Mon Nov 18, 2013 12:57 pm
Reply with quote

Exactly Pandora!
It was the same question even in mind when I heard about that question.

Reni.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 18, 2013 1:07 pm
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Nov 18, 2013 8:08 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Mon Nov 18, 2013 8:24 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Nov 18, 2013 9:32 pm
Reply with quote

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! icon_rolleyes.gif

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
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
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 Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top