Can we able to give the inputs to cobol program at run time.i.e cobol+ jcl

Showing Answers 1 - 8 of 8 Answers

Chitti Mutyala

  • Dec 5th, 2006
 

Yes, you can do that through PARM parameter in JCL on EXEC step.

dipti

  • Dec 12th, 2006
 

yes through instream data

hi,

yes we can give input to cobol program at run time,

use accept statment in cobol program and after compiling the code,

in the run jcl part u can give values in

// sysin dd *

values(r)

/*

//

this way

regards

ashish

Sodadasi

  • Dec 21st, 2006
 

We can give input to COBOL program in two ways

a) By using PARM parameter

b) By using Instream data

By using PARM parameter:

In JCL

//Stepname EXEC PGM=Programname, PARM=values

By using Instream data:

If it is Non-DB2 program

//SYSIN

Sodadasi

  • Dec 21st, 2006
 

We can give input to COBOL program in two ways

a) By using PARM parameter

b) By using Instream data

By using PARM parameter:

In JCL

//Stepname EXEC PGM=Programname, PARM=values

By using Instream data:

If it is Non-DB2 program

//SYSIN DD *

instream data...

//

If it is DB2 program

//SYSTSIN DD *

instream data...

//

Thanks

Sodadasi

  Was this answer useful?  Yes

Tom Berg

  • Jan 31st, 2007
 

The key is at "run-time", not BEFORE RUN. The point is can we provide/modify input date when program already started to run?

  Was this answer useful?  Yes

I suppose you could set the program to poll an input file. The difficulty you'd have is that while it isn't polling, it's probably looping. That's a good way to get your program swapped out or cancelled.What it sounds like you need is a started task program that remains running and processes input dynamically. If this is what you need, we're talking a whole different program structure than JCL kicking off a COBOL job.

RTM,kk

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions