Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 
Maximum number of I/O PCBs in a COBOL Program.

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

New User


Joined: 13 Apr 2007
Posts: 59
Location: Bangalore

PostPosted: Mon Nov 18, 2013 11:25 am    Post subject: Maximum number of I/O PCBs in a COBOL Program.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Nov 18, 2013 12:39 pm    Post subject: Reply to: Maximum number of I/O PCBs in a COBOL Program.
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

Moderator


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

PostPosted: Mon Nov 18, 2013 12:53 pm    Post subject:
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: Bangalore

PostPosted: Mon Nov 18, 2013 12:57 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Nov 18, 2013 1:07 pm    Post subject: Reply to: Maximum number of I/O PCBs in a COBOL Program.
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    Post subject:
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: 656
Location: Whitby, ON, Canada

PostPosted: Mon Nov 18, 2013 8:24 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Nov 18, 2013 9:32 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us