Difference between revisions of "REXX"

From MidrangeWiki
Jump to: navigation, search
(Initial page)
 
m (External links: adding TechTip: Calling SQL from REXX)
(4 intermediate revisions by 4 users not shown)
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]].)
+
{{SeealsoWP|REXX}}
 +
{{AN}} is an acronym for {{bu|RE|structured}} e{{bu|X|tended}} e{{bu|X|ecutor}}, an interpreted scripting/programming language developed 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.
+
==System i implementation==
 +
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 {{keypress|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===
Line 7: Line 11:
 
  say 'Hello, world!'  
 
  say 'Hello, world!'  
 
  return               
 
  return               
 +
 +
==Other System i REXX programs==
 +
* [http://www.google.com/base/a/1079085/D2816747039308212683?hl=en_US Switching user profiles]
 +
* [http://www.hackingiseries.com/downloads/pingsweep.rexx A ping sweep written in REXX for System i]
 +
* [http://www.google.com/base/a/1079085/D2069011821374459273?hl=en_US Capitalize A Sentence]
 +
* [http://www.google.com/base/a/1079085/D2777053214771168713?hl=en_US Factorial recursion]
 +
* [http://www.google.com/base/a/1079085/D8025156647175713805?hl=en_US Copy table to delimited file with headers]
  
 
==External links==
 
==External links==
 
* [http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahg/rzahgrexx.htm System i REXX V5R4M0 documentation]
 
* [http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahg/rzahgrexx.htm System i REXX V5R4M0 documentation]
* [http://en.wikipedia.org/wiki/REXX Wikipedia entry for REXX]
 
 
* [http://www-306.ibm.com/software/awdtools/rexx/library/index.html IBM general REXX information]
 
* [http://www-306.ibm.com/software/awdtools/rexx/library/index.html IBM general REXX information]
 
* [http://www.rexxla.org/ REXX Language Association]
 
* [http://www.rexxla.org/ REXX Language Association]
Line 16: Line 26:
 
* [http://www.rexswain.com/rexx.html Rex Swain's VM REXX page]
 
* [http://www.rexswain.com/rexx.html Rex Swain's VM REXX page]
 
* [http://www.rexxinfo.org/ http://www.rexxinfo.org/]
 
* [http://www.rexxinfo.org/ http://www.rexxinfo.org/]
 +
* [http://www.mcpressonline.com/tips-techniques/sql/techtip-calling-sql-from-rexx.html "TechTip: Calling SQL from REXX"] Written by Joe Pluta, Thursday, 24 February 2005
  
 
==Categories==
 
==Categories==
[[Programming]]
+
[[Category:Programming languages]]
{{stub}}
+
[[Category:REXX|*]]

Revision as of 22:05, 31 July 2008

See also on Wikipedia: REXX

REXX is an acronym for REstructured eXtended eXecutor, an interpreted scripting/programming language developed 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.)

System i implementation

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              

Other System i REXX programs

External links

Categories