Page 1 of 4

Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 12:02 am
by daloporhecho
My PL/I code has the following:

dcl my_output file stream output;

If I had to run this program from a JCL I'd assign a DD to match this 'my_output'. But this program runs online (called from another via plitdli).

Question is: how do I assign the resources (input and output) when the program runs online instead of batch?

Thanks a lot!

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 12:08 am
by enrico-sorichetti
if the program, as You say, runs online
You are out of luck, You cannot do any I/O operation on mvs files

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 12:29 am
by daloporhecho
The program is already running. Is online. Does use a file stream output. Are you sure IMS doesn't play a role assigning resources?

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 12:51 am
by NicC
has the program ever executed the bit of code that writes to that file? Are there any writes to that file in the program?!

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 12:57 am
by daloporhecho
Actually, I can't say whether is a file or a printer or something else. But yes, there are PUTs to that file:
put file (my_output) skip edit ('DB2 SQL SEVERE ERROR') (A);

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 12:59 am
by NicC
Has it ever been written to? Also, is the file OPENed in the program - if it has never been accessed then IMS will not know about it but it could be an abend waiting to happen.

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 1:13 am
by daloporhecho
The file is OPENed. Can't say if it has ever been written to.
I can't believe what you guys are telling me: you can't use file input and output from PL/I unless your program runs batch. I'm very new to PL/I and IMS, but that doesn't sound very reasonable to me. I'm not saying you are wrong, but confusion grows stronger and stronger in poor me.

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 2:30 am
by dick scherrer
Hello,

For this particular question, what does "online" mean?

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 2:46 am
by daloporhecho
The opposite to batch: no JCL involved.

Re: Input stream for online (not batch) PL/I procedure

PostPosted: Thu Dec 23, 2010 3:20 am
by Akatsukami
daloporhecho wrote:The opposite to batch: no JCL involved.

Using IMS DC or CICS?