Loading

DISPLAY statement in Easytrieve

DISPLAY statement in Easytrieve is exactly the same as in COBOL.

 WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE'
 ...
 DISPLAY 'value of WS-VAR1 is: ' WS-VAR1

This will be printed as

 value of WS-VAR1 is: I AM INITIALIZED HERE

If you want to continue the DISPLAY statement in multiple lines, use ‘+’ symbol as continuation character

 WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE'
 ...
 DISPLAY 'value of WS-VAR1 is: ' +
         WS-VAR1

Related Posts




blog comments powered by Disqus

There's 3 Comments So Far

  •   kiranmayi
    March 26th, 2012 at 11:30 am

    Im new to easytrieve, Is there any equalent command for display?? Display is not working.

  •   Karthik
    March 28th, 2012 at 3:46 am

    Hi Kiran,

    The above syntax of DISPLAY should work. Can you tell me what error you are getting (along with your code snippet) ?

  •   kiranmayi
    March 28th, 2012 at 2:00 pm

    Hey i used it to display information in an output file. I come to know that we can use display to read info in spool but not in an output file. thanks for your response

Share your thoughts, leave a comment!