Page 1 of 1

Different ways of calling a program

PostPosted: Thu Nov 14, 2013 2:32 pm
by pulsar22
Hi,
What are the different ways in which we can call a program from CICS program other than the ones mentioned below:

XCTL
LINK
Mentioning the transaction ID in return command.

Re: Different ways of calling a program

PostPosted: Fri Nov 15, 2013 9:43 pm
by Mickeydusaor
start, return

Re: Different ways of calling a program

PostPosted: Fri Nov 15, 2013 9:52 pm
by Robert Sample
You can also use the language CALL statement.

Re: Different ways of calling a program

PostPosted: Sun Nov 17, 2013 5:14 am
by c62ap90
   EXEC CICS   XCTL   {transfer control to another program with no return}
         Program   (xxxxxxxx)
         Commarea   (commarea)
         Length   (length)
   END-EXEC.

   EXEC CICS   LINK   {calls another program and returns to current program}
         Program   (xxxxxxxx)
         Commarea   (commarea)
         Length   (length)
   END-EXEC.

Re: Different ways of calling a program

PostPosted: Sun Nov 17, 2013 3:24 pm
by NicC
c62ap90,

Those 2 methods were mentioned in the original post. OP wants OTHER ways of calling a program.

Re: Different ways of calling a program

PostPosted: Sun Nov 17, 2013 9:07 pm
by c62ap90
Hey NicC...

I just posted the "full" EXEC in case others want to learn from the format since this is a forum for learning. It will help in future searches too.

If you think it will not be helpful to anyone, then delete my posts! Thanks.

Re: Different ways of calling a program

PostPosted: Mon Nov 18, 2013 7:59 pm
by Ed Goodman
TDQ program name to run when records show up in the queue
Batch program starting transaction
(never did it, but does CICS have something like IMS's BMP?)

Re: Different ways of calling a program

PostPosted: Thu Nov 28, 2013 9:53 pm
by Quasar
Hi,

CICS allows you to write foreground as well as background tasks.

Foreground Programs
In an application, there are a number of options like Inquiry/Add/Update/Delete screens under one facility/main menu. In CICS, you'd XCTL from the Main-Menu program to the Inquiry/Add/Update/Delete programs.

If you had to invoke a sub-program, the caller wants the control back, you LINK PROGRAM(WS-SUB-PROGRAM) and RETURN. Now, lots of CICS screens have date fields. The date entered has got to be a valid date. So, a CICS application may LINK to the date-validation program, every-time a date check is required. The date routine is just a helper module and the main program expects the control back, so it makes sense to LINK to it.

START'ed tasks
When a CICS transaction does typical batch-style processing of big amounts of data, you create it as a CICS background task(instead of a foreground). CICS runs background tasks at a lower-priority. CICS background tasks are always START'ed.

Thanks.
Quasar