Difference between revisions of "RPG Built In Functions"
From MidrangeWiki
(Tabula Format is easier on the eyes, Sorting data makes it informative) |
DaveLClarkI (talk | contribs) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: Quick Reference]] | [[Category: Quick Reference]] | ||
[[Category:RPG]] | [[Category:RPG]] | ||
+ | |||
+ | '''RPG IV Concepts''' As of V5R2 [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm IC2924] at the IBM iSeries Information Center | ||
+ | |||
{| class="sortable" border="1" | {| class="sortable" border="1" | ||
! Note !! Function !! Description !! Type | ! Note !! Function !! Description !! Type | ||
Line 8: | Line 11: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBADDR %ADDR] || Get Address of Variable || Pointer | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBADDR %ADDR] || Get Address of Variable || Pointer | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBALLOC %ALLOC] || Allocate Storage || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBALLOC %ALLOC] || Allocate Storage || Memory |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBAND %BITAND] || Bitwise AND Operation || Binary | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBAND %BITAND] || Bitwise AND Operation || Binary | ||
Line 24: | Line 21: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBXOR %BITXOR] || Bitwise Exclusive-OR Operation || Binary | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBXOR %BITXOR] || Bitwise Exclusive-OR Operation || Binary | ||
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#Header_720 % | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#Header_720 %BITxxx examples] || Bit Operations || Binary |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBCHAR %CHAR] || Convert to Character Data || Format | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBCHAR %CHAR] || Convert to Character Data || Format | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBCHK %CHECK] || Check Characters || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBCHK %CHECK] || Check Characters || Flag |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBCHKR %CHECKR] || Check Reverse || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBCHKR %CHECKR] || Check Reverse || Flag |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDATE %DATE] || Convert to Date || Date | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDATE %DATE] || Convert to Date || Date | ||
Line 40: | Line 37: | ||
| • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDECH %DECH] || Convert to Packed Decimal Format with Half Adjust || Format | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDECH %DECH] || Convert to Packed Decimal Format with Half Adjust || Format | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDECP %DECPOS] || Get Number of Decimal Positions || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDECP %DECPOS] || Get Number of Decimal Positions || Numeric |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDIF %DIFF] || Difference Between Two Date, Time, or Timestamp Values || Date | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBDIF %DIFF] || Difference Between Two Date, Time, or Timestamp Values || Date | ||
Line 52: | Line 49: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBEDITW %EDITW] || Edit Value Using an Editword || Format | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBEDITW %EDITW] || Edit Value Using an Editword || Format | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBELEM %ELEM] || Get Number of Elements || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBELEM %ELEM] || Get Number of Elements || Tally |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBEOF %EOF] || Return End or Beginning of File Condition || Pointer | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBEOF %EOF] || Return End or Beginning of File Condition || Pointer | ||
Line 60: | Line 57: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBERROR %ERROR] || Return Error Condition || Flag | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBERROR %ERROR] || Return Error Condition || Flag | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBFIELDS %FIELDS] || Fields to update || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBFIELDS %FIELDS] || Fields to update || Flag |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBFLOAT %FLOAT] || Convert to Floating Format || Format | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBFLOAT %FLOAT] || Convert to Floating Format || Format | ||
Line 74: | Line 71: | ||
| • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBINTH %INTH] || Convert to Integer Format with Half Adjust || Format | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBINTH %INTH] || Convert to Integer Format with Half Adjust || Format | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBKDS %KDS] || Search Arguments in Data Structure || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBKDS %KDS] || Search Arguments in Data Structure || Search |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBLEN %LEN] || Get or Set Length || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBLEN %LEN] || Get or Set Length || Evaluate |
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRLNRIGHT %LEN] || Used for its Value || | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRLNRIGHT %LEN] || Used for its Value || Evaluate |
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRLENLEFT %LEN] || Used to Set the Length of Variable-Length Fields || | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRLENLEFT %LEN] || Used to Set the Length of Variable-Length Fields || Evaluate |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBLOO %LOOKUPxx] || Look Up an Array Element || Search | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBLOO %LOOKUPxx] || Look Up an Array Element || Search | ||
Line 98: | Line 95: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBPADDR %PADDR] || Get Procedure Address || Pointer | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBPADDR %PADDR] || Get Procedure Address || Pointer | ||
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#Header_758 %PADDR] || Used with a Prototype || | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#Header_758 %PADDR] || Used with a Prototype || Pointer |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBPARM %PARMS] || Return Number of Parameters || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBPARM %PARMS] || Return Number of Parameters || Numeric |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBREALL %REALLOC] || Reallocate Storage || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBREALL %REALLOC] || Reallocate Storage || Memory |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBREM %REM] || Return Integer Remainder || Evaluate | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBREM %REM] || Return Integer Remainder || Evaluate | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBREPL %REPLACE] || Replace Character String || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBREPL %REPLACE] || Replace Character String || String |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSCAN %SCAN] || Scan for Characters || Search | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSCAN %SCAN] || Scan for Characters || Search | ||
Line 112: | Line 109: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSEC %SECONDS] || Number of Seconds || Time | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSEC %SECONDS] || Number of Seconds || Time | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSHUT %SHTDN] || Shut Down || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSHUT %SHTDN] || Shut Down || "*LR" |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSIZE %SIZE] || Get Size in Bytes || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSIZE %SIZE] || Get Size in Bytes || String |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSQRT %SQRT] || Square Root of Expression || Evaluate | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSQRT %SQRT] || Square Root of Expression || Evaluate | ||
Line 120: | Line 117: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTAT %STATUS] || Return File or Program Status || Flag | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTAT %STATUS] || Return File or Program Status || Flag | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTR %STR] || Get or Store Null-Terminated String || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTR %STR] || Get or Store Null-Terminated String || String |
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTRR %STR] || Used to Get Null-Terminated String || | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTRR %STR] || Used to Get Null-Terminated String || String |
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTRL %STR] || Used to Store Null-Terminated String || | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSTRL %STR] || Used to Store Null-Terminated String || String |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBD %SUBDT] || Extract a Portion of a Date, Time, or Timestamp || Date | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBD %SUBDT] || Extract a Portion of a Date, Time, or Timestamp || Date | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBS9 % | + | | ? || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBS9 %SUBARR] || Move contiguous array elements to contiguous elements of another array || Array |
|- | |- | ||
− | |   | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBS9 %SUBST] || Get Substring || String |
|- | |- | ||
− | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm# | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBSV %SUBST] || Used for its Value || String |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTHIS %THIS] || Return Class Instance for Native Method || | + | | • || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBSUBSA %SUBST] || Used as the Result of an Assignment || String |
+ | |- | ||
+ | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTHIS %THIS] || Return Class Instance for Native Method || Memory | ||
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTIME %TIME] || Convert to Time || Time | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTIME %TIME] || Convert to Time || Time | ||
Line 142: | Line 141: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTLOO %TLOOKUPxx] || Look Up a Table Element || Search | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTLOO %TLOOKUPxx] || Look Up a Table Element || Search | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTRIM %TRIM] || Trim Blanks at Edges || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTRIM %TRIM] || Trim Blanks at Edges || String |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTRIML %TRIML] || Trim Leading Blanks || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTRIML %TRIML] || Trim Leading Blanks || String |
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTRIMR %TRIMR] || Trim Trailing Blanks || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBTRIMR %TRIMR] || Trim Trailing Blanks || String |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBUCS2 %UCS2] || Convert to UCS-2 Value || Format | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBUCS2 %UCS2] || Convert to UCS-2 Value || Format | ||
Line 156: | Line 155: | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBXFOOT %XFOOT] || Sum Array Expression Elements || Evaluate | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBXFOOT %XFOOT] || Sum Array Expression Elements || Evaluate | ||
|- | |- | ||
− | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBXLAT %XLATE] || Translate || | + | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBXLAT %XLATE] || Translate || String |
|- | |- | ||
| || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBYEAR %YEARS] || Number of Years || Date | | || [http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508429.htm#HDRBBYEAR %YEARS] || Number of Years || Date | ||
+ | |} | ||
+ | |||
+ | As of V7R1: | ||
+ | |||
+ | {| class="sortable" border="1" width="670px" | ||
+ | ! Note !! Function !! Description !! Type | ||
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbparmnum.htm %PARMNUM] || Return Parameter Number || Numeric |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbscanrp.htm %SCANRPL] || Scan and Replace Characters || String |
− | | | + | |} |
− | + | ||
− | + | As of V7R2: | |
− | + | ||
− | | | + | {| class="sortable" border="1" width="670px" |
− | + | ! Note !! Function !! Description !! Type | |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbdata.htm %DATA] || Parameter for DATA-INTO || HTTP |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbhandl.htm %HANDLER] || Parameter for DATA-INTO, XML-INTO, or XML-SAX || HTTP |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbmaxvalue.htm %MAX] || Maximum Value || Evaluate |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbminvalue.htm %MIN] || Minimum Value || Evaluate |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbparser.htm %PARSER] || Parameter for DATA-INTO || HTTP |
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbproc.htm %PROC] || Return Name of Current Procedure || String |
|- | |- | ||
− | |   | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/bbxml.htm %XML] || Parameter for XML-INTO or XML-SAX || HTTP |
− | + | |} | |
− | + | ||
− | + | As of V7R3: | |
− | + | ||
− | + | {| class="sortable" border="1" width="670px" | |
− | + | ! Note !! Function !! Description !! Type | |
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | || [ | + | | || [https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzasd/bbscanr.htm %SCANR] || Scan Reverse for Characters || String |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 19:08, 7 January 2019
RPG IV Concepts As of V5R2 IC2924 at the IBM iSeries Information Center
Note | Function | Description | Type |
---|---|---|---|
%ABS | Absolute Value of Expression | Evaluate | |
%ADDR | Get Address of Variable | Pointer | |
%ALLOC | Allocate Storage | Memory | |
%BITAND | Bitwise AND Operation | Binary | |
%BITNOT | Invert Bits | Binary | |
%BITOR | Bitwise OR Operation | Binary | |
%BITXOR | Bitwise Exclusive-OR Operation | Binary | |
• | %BITxxx examples | Bit Operations | Binary |
%CHAR | Convert to Character Data | Format | |
%CHECK | Check Characters | Flag | |
%CHECKR | Check Reverse | Flag | |
%DATE | Convert to Date | Date | |
%DAYS | Number of Days | Date | |
%DEC | Convert to Packed Decimal Format | Format | |
• | %DECH | Convert to Packed Decimal Format with Half Adjust | Format |
%DECPOS | Get Number of Decimal Positions | Numeric | |
%DIFF | Difference Between Two Date, Time, or Timestamp Values | Date | |
%DIV | Return Integer Portion of Quotient | Evaluate | |
%EDITC | Edit Value Using an Editcode | Format | |
%EDITFLT | Convert to Float External Representation | Format | |
%EDITW | Edit Value Using an Editword | Format | |
%ELEM | Get Number of Elements | Tally | |
%EOF | Return End or Beginning of File Condition | Pointer | |
%EQUAL | Return Exact Match Condition | Flag | |
%ERROR | Return Error Condition | Flag | |
%FIELDS | Fields to update | Flag | |
%FLOAT | Convert to Floating Format | Format | |
%FOUND | Return Found Condition | Flag | |
%GRAPH | Convert to Graphic Value | Format | |
%HOURS | Number of Hours | Time | |
%INT | Convert to Integer Format | Format | |
• | %INTH | Convert to Integer Format with Half Adjust | Format |
%KDS | Search Arguments in Data Structure | Search | |
%LEN | Get or Set Length | Evaluate | |
• | %LEN | Used for its Value | Evaluate |
• | %LEN | Used to Set the Length of Variable-Length Fields | Evaluate |
%LOOKUPxx | Look Up an Array Element | Search | |
%MINUTES | Number of Minutes | Time | |
%MONTHS | Number of Months | Date | |
%MSECONDS | Number of Microseconds | Time | |
%NULLIND | Query or Set Null Indicator | Flag | |
%OCCUR | Set/Get Occurrence of a Data Structure | Pointer | |
%OPEN | Return File Open Condition | Flag | |
%PADDR | Get Procedure Address | Pointer | |
• | %PADDR | Used with a Prototype | Pointer |
%PARMS | Return Number of Parameters | Numeric | |
%REALLOC | Reallocate Storage | Memory | |
%REM | Return Integer Remainder | Evaluate | |
%REPLACE | Replace Character String | String | |
%SCAN | Scan for Characters | Search | |
%SECONDS | Number of Seconds | Time | |
%SHTDN | Shut Down | "*LR" | |
%SIZE | Get Size in Bytes | String | |
%SQRT | Square Root of Expression | Evaluate | |
%STATUS | Return File or Program Status | Flag | |
%STR | Get or Store Null-Terminated String | String | |
• | %STR | Used to Get Null-Terminated String | String |
• | %STR | Used to Store Null-Terminated String | String |
%SUBDT | Extract a Portion of a Date, Time, or Timestamp | Date | |
? | %SUBARR | Move contiguous array elements to contiguous elements of another array | Array |
%SUBST | Get Substring | String | |
• | %SUBST | Used for its Value | String |
• | %SUBST | Used as the Result of an Assignment | String |
%THIS | Return Class Instance for Native Method | Memory | |
%TIME | Convert to Time | Time | |
%TIMESTAMP | Convert to Timestamp | Date | |
%TLOOKUPxx | Look Up a Table Element | Search | |
%TRIM | Trim Blanks at Edges | String | |
%TRIML | Trim Leading Blanks | String | |
%TRIMR | Trim Trailing Blanks | String | |
%UCS2 | Convert to UCS-2 Value | Format | |
%UNS | Convert to Unsigned Format | Format | |
• | %UNSH | Convert to Unsigned Format with Half Adjust | Format |
%XFOOT | Sum Array Expression Elements | Evaluate | |
%XLATE | Translate | String | |
%YEARS | Number of Years | Date |
As of V7R1:
Note | Function | Description | Type |
---|---|---|---|
%PARMNUM | Return Parameter Number | Numeric | |
%SCANRPL | Scan and Replace Characters | String |
As of V7R2:
Note | Function | Description | Type |
---|---|---|---|
%DATA | Parameter for DATA-INTO | HTTP | |
%HANDLER | Parameter for DATA-INTO, XML-INTO, or XML-SAX | HTTP | |
%MAX | Maximum Value | Evaluate | |
%MIN | Minimum Value | Evaluate | |
%PARSER | Parameter for DATA-INTO | HTTP | |
%PROC | Return Name of Current Procedure | String | |
%XML | Parameter for XML-INTO or XML-SAX | HTTP |
As of V7R3:
Note | Function | Description | Type |
---|---|---|---|
%SCANR | Scan Reverse for Characters | String |