Midrange News for the IBM i Community

Posted by: TFisher
DSPLY Operation Code
has no ratings.
Published: 19 May 2014
Revised: 21 May 2014 - 3572 days ago
Last viewed on: 01 Mar 2024 (5043 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

DSPLY Operation Code Published by: TFisher on 19 May 2014 view comments(2)

Just curious if anyone else has noticed this, and if so why...

I wrote a quick little program over the weekend to give to an entry level programmer to show them all the different SQL statements embedded in an RPG program.  When they run the program is uses DSPLY to show records being selected from a table.  When I run it from within PDM it shows one record at a time and I have to press Enter to continue to the next FETCH and DSPLY.  However, if I run it from QCMD or the system command window (QUSCMDLN) then DSPLY doesn't wait for a response and all the records are displayed on the screen real fast.

Has anyone else experienced this?  More importantly, does anyone know why or how to control this?

Return to midrangenews.com home page.
Sort Ascend | Descend


(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: DSPLY Operation Code
Posted: 9 years 9 months 13 days 3 hours 40 minutes ago

There is a comment in the Ref about DSPLY opcode that says if there's no response operand, the program does not wait for a response unless a display file with RSTDSP(*NO) was used. I'll hazard a guess that PDM is using a display file set to RSTDSP(*NO), and QCMD is RSTDSP(*YES).

Posted by: TFisher
Premium member *
Comment on: DSPLY Operation Code
Posted: 9 years 9 months 12 days 5 hours 7 minutes ago

Ah, that makes sense.