Reputation: 43
hope someone can help me. I cannot see the DSPLY 'some text' output from my RPGLE program in the command window. I am using IBM Websphere development studio client for iseries to create a simple RPGLE program. I can compile the program with no errors, but cannot see the display text to see if it works when running it CALL MYLIB/TESTRPG. Here's my program code:
/free
dsply 'Hello World';
return;
Please help. Feels like i am "learning in the dark".
Thanks in advance
Upvotes: 4
Views: 2364
Reputation: 11
This is just a note I made on this in 2006 (16 years?!) about calling CL within RPG. Maybe change the DLYJOB below to SNDMSG, SNDBRKMSG, etc (https://www.ibm.com/docs/en/i/7.4?topic=messages-commands-used-send-system-user)
/IF Defined(*CRTBNDRPG)
H DFTACTGRP(*NO)
/ENDIF
H BNDDIR('QC2LE')
D GoCmd PR 10I 0 Extproc('system')
D CmdStr * value
D options(*string)
D NullString C -1
D Success C 0
D Returncode S 10I 0
D User S 10 Inz(*User) Varying
/free
Returncode = Gocmd('DLYJOB DLY(300)'); // change to a SNDBRKMSG maybe?
Select;
When Returncode = Success; // Command was successful
When Returncode = NullString; // Command string was null
Other;
Endsl;
*INLR=*ON;
/end-free
Good luck
Upvotes: 0
Reputation: 7592
If you are running your program on the emulated terminal (the green screen), then there are some places where your program's output does not really show (it lights up during the execution time of your program, but that's normally to brief to even notice it).
You can look at what has been displayed in your interactive job's joblog with dspjoblog
(it's a little weird to use at first).
dspjoblog
F10
to display all messagesPageUp
to scroll to previous messagesYou should be seeing something like:
3 > call MYLIB/TESTRPG
DSPLY Hello World!
There are places where you don't have to do that. The tool PDM is one such place (at least on the machine I'm using). You can start that program by simple entering
strpdm
You will have a command line at the bottom, from which you can call your program. While inside PDM, every dsply
command should interrupt the flow of your program, light up and wait for you to hit Ctrl or Enter or whatever your key for execution is.
Another place where you can see your messages immediately is QCMD. You can start it by typing
call qcmd
You may have to hit F10
there, that toggles display of your dsply
messages. Here you will see the messages without having to press return.
If you are in fact running your program directly from within IBM Websphere Development Studio, I am afraid I can't help you, since I never do that. If you have access to a terminal, you might be able to try one of the ways I described.
Upvotes: 3