Re: Passing data to new task

Discussion created by ca.portal.admin on May 20, 2008
Hi Kay:

As I'm sure you're aware, you can't pass a parameter list to a task via DC ATTACH. However, you can pass a parameter list via DC SETIME (use TYPE=WAIT,INTVL=0). I've used this before, so please feel free to email me directly if you'd like additional information about SETIME.

Of course, you can use DC ATTACH, but you'll have to use conventional data passing structures/methodologies, including user storage, Scratch/Queue/database records, etc.

All of the above options have various ramifications, but SETIME is probably the very easiest to implement.


Tom Schoenborn

----- Original Message -----
From: ""Rozeboom, Kay [DAS]"" <KAY.ROZEBOOM@IOWA.GOV>
Sent: Tuesday, May 20, 2008 12:20 PM
Subject: Passing data to new task

What is the best way to pass data to a new task intiated by a DC ATTACH command?

Kay Rozeboom
State of Iowa
Information Technology Enterprise
Department of Administrative Services
Telephone: 515.281.6139 Fax: 515.281.6137
Email: Kay.Rozeboom@Iowa.Gov
IDMS Public Discussion Forum


Re: Passing data to new task
"Hi Kay:

No such thing as a dumb question ;-}}

Yes, you should be able to have an assembler program SETIME a task code that
invokes a Cobol program. The parameter list would be passed via the LINKAGE
SECTION and PROCEDURE DIVISION USING clause. The parameter list should be a
2byte length followed by a pointer to the data to be passed. (See DML
reference for Cobol/Assembler).

You mentioned that the invocating process is a database procedure, so I'm
sure this discussion is a continuation of an earlier one regarding an
assembler database procedure invoking another program to do database DML.
There has been some dialog on this board regarding the invocation of ADS
processes, but I can't recommend any of the methodologies for this
particular problem.

I liked Gary's suggestions, but all of these strategies requires some
thoughtful 'retry' logic. While the SETIME is ""easy"" (everything is
relative...), this is a database procedure, and you may want to consider
using a QUEUE rather than SETIME. Either SETIME or PUT QUEUE could fail
(ok, remote possibility, but still a possibility...), and in both cases,
you'll have to develop a method of invoking the second program in case the
database procedure can't get it 'launched'. It seems to me that leaving a
QUEUE record and/or a message in the IDMS log is a good way to have an
artifact of what work needed to be done. So, perhaps a #WTL and a #SETIME,
or a combination of #WTL and #PUTQUE...

Let me know if you would like some help with any assembler coding.



----- Original Message -----
From: ""Rozeboom, Kay [DAS]"" <KAY.ROZEBOOM@IOWA.GOV>
Sent: Wednesday, May 21, 2008 9:05 AM
Subject: Re: Passing data to new task

Tom, I hope this is not a dumb question: Could the second program be
written in COBOL, and still be able to access the parameter list?

The reason I am asking these questions is that we are looking for a way to
kick off a new process from a database (schema) procedure. The database
procedure is assembler of course, but we would rather write the new process
in COBOL. (I believe an ADS mapless dialog is out of the question. Please
let me know if I am wrong about that.)

I think the other solution might be to write the passed data to a queue with
a trigger level of one, as per Gary's suggestion. (I also like Gary's
TCP/IP suggestion, but am not thrilled with the idea of trying to do that in