RPGLE Print to command window

孤者浪人 提交于 2019-12-23 15:14:14

问题


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


回答1:


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).

  1. execute the command dspjoblog
  2. press F10 to display all messages
  3. pres PageUp to scroll to previous messages

You 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.



来源:https://stackoverflow.com/questions/18313289/rpgle-print-to-command-window

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!