blog:iseries:rpg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
blog:iseries:rpg [2020/03/07 04:28]
tom [ACTIVATION GROUPS]
blog:iseries:rpg [2020/03/07 04:34]
tom [SQL]
Line 948: Line 948:
 ===== Literals ===== ===== Literals =====
 <code rpgfree> <code rpgfree>
- H DATFMT(*ISO) + H DATFMT(*ISO) 
- * Examples of literals used to initialize fields + * Examples of literals used to initialize fields 
- DName+++++++++++ETDsFrom+++To/​L+++IDc.Keywords+++++++++++++++++++++++++++++ + DName+++++++++++ETDsFrom+++To/​L+++IDc.Keywords+++++++++++++++++++++++++++++ 
- D DateField   S   D   ​INZ(D'​1988-09-03'​) + D DateField   S   D   ​INZ(D'​1988-09-03'​) 
- D NumField   S 5P 1 INZ(5.2) + D NumField   S 5P 1 INZ(5.2) 
- D CharField   S 10A ​  ​INZ('​abcdefghij'​) + D CharField   S 10A ​  ​INZ('​abcdefghij'​) 
- D UCS2Field   S 2C   ​INZ(U'​00610062'​) + D UCS2Field   S 2C   ​INZ(U'​00610062'​) 
- * Even though the date field is defined with a 2-digit year, the + * Even though the date field is defined with a 2-digit year, the 
- * initialization value must be defined with a 4-digit year, since + * initialization value must be defined with a 4-digit year, since 
- * all literals must be specified in date format specified + * all literals must be specified in date format specified 
- * on the control specification. + * on the control specification. 
- D YmdDate   S   D   ​INZ(D'​2001-01-13'​) + D YmdDate   S   D   ​INZ(D'​2001-01-13'​) 
- D  ​ DATFMT(*YMD) + D  ​ DATFMT(*YMD) 
- * Examples of literals used to define named constants + * Examples of literals used to define named constants 
- D DateConst   C   CONST(D'​1988-09-03'​) + D DateConst   C   CONST(D'​1988-09-03'​) 
- D NumConst   C   CONST(5.2) + D NumConst   C   CONST(5.2) 
- D CharConst   C    CONST('​abcdefghij'​) + D CharConst   C    CONST('​abcdefghij'​) 
- * Note that the CONST keyword is not required. + * Note that the CONST keyword is not required. 
- D Upper   C        '​ABCDEFGHIJKLMNOPQRSTUVWXYZ'​ + D Upper   C        '​ABCDEFGHIJKLMNOPQRSTUVWXYZ'​ 
- * Note that the literal may be continued on the next line + * Note that the literal may be continued on the next line 
- D Lower   C   '​abcdefghijklmn- + D Lower   C   '​abcdefghijklmn- 
- D  ​ opqrstuvwxyz'</​code>​+ D  ​ opqrstuvwxyz'</​code>​
  
 ==== float literals ==== ==== float literals ====
Line 1047: Line 1047:
 ===== Monitor ​ (for errors) ===== ===== Monitor ​ (for errors) =====
 <code rpgfree> <code rpgfree>
-                       ​monitor ​                                                  ​* start monitor +                 ​monitor ​                                    ​* start monitor 
-     ​                  ​eval      ivinue = ivinue + movc95 ​         * eval equation +   ​              ​eval      ivinue = ivinue + movc95 ​         * eval equation 
-     ​                  ​on-error ​ 0103                                         ​* field too small +   ​              ​on-error ​ 0103                              * field too small 
-     ​                  ​eval      ivinue = *hival ​                           * reset +   ​              ​eval      ivinue = *hival ​                  ​* reset 
-     ​                  ​endmon ​                                                  ​* end monitor+   ​              ​endmon ​                                     * end monitor
 </​code>​ </​code>​
 ------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Line 1142: Line 1142:
 Create commands create 2 names - an SQL name (128 char max) and a system name (10 char max) Create commands create 2 names - an SQL name (128 char max) and a system name (10 char max)
 Create Table (PF) Create Table (PF)
-  %%Create Table xxx As Select...%%+<code sql>Create Table xxx As Select...</​code>​
   : creates a table using a subset of field from an existing table   : creates a table using a subset of field from an existing table
-  %%Create Table xxx Like MyTable...%%+<code sql>Create Table xxx Like MyTable...</​code>​
   : all fields in referenced table used in created table   : all fields in referenced table used in created table
 Create View Create View
Line 1182: Line 1182:
   : a set of actions that are run automatically whenever a specified event occurs to a specified base table   : a set of actions that are run automatically whenever a specified event occurs to a specified base table
 UDT UDT
-   <code sql>​CREATE DISTINCT TYPE US_DOLLAR AS DECIMAL (9,​2)</​code>​+<code sql>​CREATE DISTINCT TYPE US_DOLLAR AS DECIMAL (9,​2)</​code>​
   : can then create tables with field types of US_DOLLAR (or string, integer, etc.)   : can then create tables with field types of US_DOLLAR (or string, integer, etc.)
 view  view 
  • blog/iseries/rpg.txt
  • Last modified: 2020/03/07 04:37
  • by tom