BrianMc1958
asked on
Can you redirect COBOL DISPLAYs to a file?
Dear Experts,
Is there any way on the AS/400 to redirect COBOL DISPLAY statements, such that they are written to a file instead of displaying on the terminal? Could you use some sort of preceding CL override to do this?
Thanks,
BrianMc1958
Is there any way on the AS/400 to redirect COBOL DISPLAY statements, such that they are written to a file instead of displaying on the terminal? Could you use some sort of preceding CL override to do this?
Thanks,
BrianMc1958
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear Everybody,
Thanks, but I'm afraid business pressures have forced me to move on from this question, so I can't try it out. If anyone is reading this later, give it a try! As it is, I'm forced to award points to Tom. His response matches my experience: You can't get there from here.
Thanks again!
--BrianMc1958
Thanks, but I'm afraid business pressures have forced me to move on from this question, so I can't try it out. If anyone is reading this later, give it a try! As it is, I'm forced to award points to Tom. His response matches my experience: You can't get there from here.
Thanks again!
--BrianMc1958
BrianMc1958:
Wish I could do more. Dave's STRCPYSCN is a novel idea. Best I can do is to point to retrieving messages from the joblog (i.e., the job *EXT message queue) after the program is done.
Assuming this is a kind of audit function, I'd guess that retrieving the messages is as good as it's gonna get. Reading up on COBOL DISPLAY gave no better hint.
Tom
Wish I could do more. Dave's STRCPYSCN is a novel idea. Best I can do is to point to retrieving messages from the joblog (i.e., the job *EXT message queue) after the program is done.
Assuming this is a kind of audit function, I'd guess that retrieving the messages is as good as it's gonna get. Reading up on COBOL DISPLAY gave no better hint.
Tom
I have never tried it but in cl try
pgm
CRTDUPOBJ OBJ(QASCCPY) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(mylib) NEWOBJ(MYFILE)
strcpysrc srcdev(*requester) outdev(*none) outfile(mylib/myfile)
call pgm
ENDCPYSCN
endpgm
Dave