Difference between revisions of "REXX"

From MidrangeWiki
Jump to: navigation, search
m (Categories: edit categories)
Line 1: Line 1:
 
{{AN}} is an interpreted language invented by IBM.  It is simple to learn and is available on many platforms, including i5/OS.  It was used as the macro language in the Code/400 GUI editor (precursor to [[WDSC]] and [[RDi]].)
 
{{AN}} is an interpreted language invented by IBM.  It is simple to learn and is available on many platforms, including i5/OS.  It was used as the macro language in the Code/400 GUI editor (precursor to [[WDSC]] and [[RDi]].)
  
On System i, REXX source is stored in a source member, the default is {{code|QREXSRC}}.  It is executed by {{code|STRREXPRC}}.  It is helpful to define a [[PDM]] or [[WDSC]] option to invoke the REXX interpreter: {{code|?STRREXPRC SRCMBR(&N) SRCFILE(&L/&F)}}.  The question mark in front of the command signifies prompting, which will allow you to fill in any parameters you might want. All REXX programs begin with a comment.  White space is for programmer convenience and can be added or omitted as desired.
+
On System i, REXX source is stored in a source member, the default is {{code|QREXSRC}}.  It is executed by {{code|STRREXPRC}}.  It might be helpful to define a [[PDM]] or [[WDSC]] option to invoke the REXX interpreter: {{code|?STRREXPRC SRCMBR(&N) SRCFILE(&L/&F)}}; however, [[PDM]] recognizes source members that have source type REXX and will execute STRREXPRC against them when option 16 ("Run procedure") is entered.  The question mark in front of the command signifies prompting, which will allow you to fill in any parameters you might want. If [[PDM]] option 16 is used, the <F4> key will perform prompting.
 +
 
 +
According to most manuals, all REXX programs should begin with a comment; but this seems to be no longer required, at least under i5/OS. (It is not required on most V5R3 and later systems. It is not clear when this was first allowed.) White space is for programmer convenience and can be added or omitted as desired.
  
 
===Hello world===
 
===Hello world===

Revision as of 20:09, 22 April 2008

REXX is an interpreted language invented by IBM. It is simple to learn and is available on many platforms, including i5/OS. It was used as the macro language in the Code/400 GUI editor (precursor to WDSC and RDi.)

On System i, REXX source is stored in a source member, the default is QREXSRC. It is executed by STRREXPRC. It might be helpful to define a PDM or WDSC option to invoke the REXX interpreter: ?STRREXPRC SRCMBR(&N) SRCFILE(&L/&F); however, PDM recognizes source members that have source type REXX and will execute STRREXPRC against them when option 16 ("Run procedure") is entered. The question mark in front of the command signifies prompting, which will allow you to fill in any parameters you might want. If PDM option 16 is used, the <F4> key will perform prompting.

According to most manuals, all REXX programs should begin with a comment; but this seems to be no longer required, at least under i5/OS. (It is not required on most V5R3 and later systems. It is not clear when this was first allowed.) White space is for programmer convenience and can be added or omitted as desired.

Hello world

/* Hello, world */ 
say 'Hello, world!' 
return              

External links

Categories

This article is a stub. You can help by editing it.