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



IBM's cross-platform compiler PL/I for MVS, VM & VSE, OS/390 and Enterprise PL/I for z/OS

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

Postby daloporhecho » Thu Dec 23, 2010 12:02 am

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!
daloporhecho
 
Posts: 32
Joined: Wed Dec 22, 2010 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby enrico-sorichetti » Thu Dec 23, 2010 12:08 am

if the program, as You say, runs online
You are out of luck, You cannot do any I/O operation on mvs files
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2966
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 160 times

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

Postby daloporhecho » Thu Dec 23, 2010 12:29 am

The program is already running. Is online. Does use a file stream output. Are you sure IMS doesn't play a role assigning resources?
daloporhecho
 
Posts: 32
Joined: Wed Dec 22, 2010 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Thu Dec 23, 2010 12:51 am

has the program ever executed the bit of code that writes to that file? Are there any writes to that file in the program?!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby daloporhecho » Thu Dec 23, 2010 12:57 am

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);
daloporhecho
 
Posts: 32
Joined: Wed Dec 22, 2010 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Thu Dec 23, 2010 12:59 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby daloporhecho » Thu Dec 23, 2010 1:13 am

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.
daloporhecho
 
Posts: 32
Joined: Wed Dec 22, 2010 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Thu Dec 23, 2010 2:30 am

Hello,

For this particular question, what does "online" mean?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby daloporhecho » Thu Dec 23, 2010 2:46 am

The opposite to batch: no JCL involved.
daloporhecho
 
Posts: 32
Joined: Wed Dec 22, 2010 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Akatsukami » Thu Dec 23, 2010 3:20 am

daloporhecho wrote:The opposite to batch: no JCL involved.

Using IMS DC or CICS?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Next

Return to PL/I

 


  • Related topics
    Replies
    Views
    Last post