Problem solve Get help with specific problems with your technologies, process and projects.

Communicating with independent programs

Generally, what kind of method is used for independent programs to communicate with each other inside an OS/400? For an easy to understand example, when ENDTCP command is issued from a workstation, how ENDTCP program communicates to TCPIP program to end?

The ENDTCP process communicates to other parts of the operating system based on the server it is attempting to stop. Some of the TCP servers are waiting on a message to be placed on a Data Queue. Some are waiting for a communications "Condition" to change, some are on a time constraint. In V4R5, there are 55 different status codes for a job. Of those, 29 are different "Wait" states for a job. This does not include any status codes that IBM doesn't allow us to see. I would think that TCP probably uses more than 8 different methods in addition to submission of jobs, job and/or subsystem terminations and direct calls to system functions or messaging that OS/400 allows.

For example, the HTTP server jobs are usually in one of two conditions: CNDW (Handle-based Condition Wait), or TIMW (Time Wait). Even in a Time Wait condition, the job can be interrupted in multiple methods: The job is "Signaled" with a message queue, data queue, user space, condition indicator, mutex and probably 5 or 6 more that we don't know about. In other instances, such as when you submit a job, the jobstream is placed on a data queue which is then read by the active subsystem controlling job. The controlling job then starts the job based on many variables. That job may then use almost any method to communicate to itself and/or other system processes. I wish there was an easy answer, but there isn't.

Dig Deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.