<Normal Text>     </Normal Text><Comment> * "F" (file) specs define files and other i/o devices</Comment><br/>
<Normal Text>     </Normal Text><Keyword>F</Keyword><Normal Text> ARMstF1   IF   E       K     Disk    Rename(ARMST:RARMST)</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * "D" (data) specs are used to define variables</Comment><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text> pCusNo          S              </Normal Text><Decimal>6</Decimal><Normal Text>p</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text> pName           S             </Normal Text><Decimal>30</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text> pAddr1          S             </Normal Text><Decimal>30</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * The "chain" command is used for random access of a keyed file</Comment><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>pCusNo        </Normal Text><Keyword>chain</Keyword><Normal Text>     ARMstF1</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * If a record is found, move fields from the file into parameters</Comment><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>if</Keyword><Normal Text>        </Normal Text><Biff>%found</Biff><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>eval</Keyword><Normal Text>      pName  = ARNm01</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>eval</Keyword><Normal Text>      pAddr1 = ARAd01</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>eval</Keyword><Normal Text>      pAddr2 = ARAd02</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>eval</Keyword><Normal Text>      pCity  = ARCy01</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * RPG makes use of switches.  One switch "LR" originally stood for "last record"</Comment><br/>
<Normal Text>     </Normal Text><Comment> * LR flags the program and its dataspace as removable from memory</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>C</Keyword><Indicator>     </Indicator><Normal Text>              </Normal Text><Keyword>eval</Keyword><Normal Text>      </Normal Text><Indicator>*InLR</Indicator><Normal Text> = </Normal Text><Constant>*On</Constant><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * "F" (file) specs define files and other i/o devices</Comment><br/>
<Normal Text>     </Normal Text><Keyword>F</Keyword><Normal Text>ARMstF1   IF   E        K     Disk    Rename(ARMST:RARMST)</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * "D" (data) specs are used to define variables and parameters</Comment><br/>
<Normal Text>     </Normal Text><Comment> * The "prototype" for the program is in a separate file</Comment><br/>
<Normal Text>     </Normal Text><Comment> * allowing other programs to call it</Comment><br/>
<Normal Text>     </Normal Text><Directive> /copy</Directive><Normal Text> cust_pr</Normal Text><br/>
<Normal Text>     </Normal Text><Comment> * The "procedure interface" describes the *ENTRY parameters</Comment><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text> getCustInf      PI</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pCusNo                        </Normal Text><Decimal>6</Decimal><Normal Text>p </Normal Text><Decimal>0</Decimal><Normal Text>   </Normal Text><Keyword>const</Keyword><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pName                        </Normal Text><Decimal>30</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pAddr1                       </Normal Text><Decimal>30</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pAddr2                       </Normal Text><Decimal>30</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pCity                        </Normal Text><Decimal>25</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pState                        </Normal Text><Decimal>2</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  pZip                         </Normal Text><Decimal>10</Decimal><Normal Text>a</Normal Text><br/>
<Normal Text>     </Normal Text><Directive> /free</Directive><br/>
<Normal Text>        </Normal Text><Comment>// The "chain" command is used for random access of a keyed file</Comment><br/>
<Normal Text>        </Normal Text><Keyword>chain</Keyword><Normal Text> pCusNo ARMstF1;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>        </Normal Text><Comment>// If a record is found, move fields from the file into parameters</Comment><br/>
<Normal Text>        </Normal Text><Keyword>if</Keyword><Normal Text> </Normal Text><Biff>%found</Biff><Normal Text>;</Normal Text><br/>
<Normal Text>           pName  = ARNm01;</Normal Text><br/>
<Normal Text>           pAddr1 = ARAd01;</Normal Text><br/>
<Normal Text>           pAddr2 = ARAd02;</Normal Text><br/>
<Normal Text>           pCity  = ARCy01;</Normal Text><br/>
<Normal Text>           pState = ARSt01;</Normal Text><br/>
<Normal Text>           pZip   = ARZp15;</Normal Text><br/>
<Normal Text>        </Normal Text><Keyword>endif</Keyword><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>      </Normal Text><Comment>// RPG makes use of switches.  One switch "LR" originally stood for "last record"</Comment><br/>
<Normal Text>      </Normal Text><Comment>// LR actually flags the program and its dataspace as removable from memory.</Comment><br/>
<Normal Text>        </Normal Text><Indicator>*InLR</Indicator><Normal Text> = </Normal Text><Constant>*On</Constant><Normal Text>;</Normal Text><br/>
<Normal Text>     </Normal Text><Directive> /end-free</Directive><br/>
<Normal Text></Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>H</Keyword><Normal Text> main(GetCustInf)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text> ARMSTF1       E DS</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>P</Keyword><Normal Text> GetCustInf      B</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text> GetCustInf      PI                  </Normal Text><Keyword>extpgm</Keyword><Normal Text>(</Normal Text><ConstantChar>'CUS001'</ConstantChar><Normal Text>)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  inCusNo                            </Normal Text><Keyword>like</Keyword><Normal Text>(arCNum) </Normal Text><Keyword>const</Keyword><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  outName                            </Normal Text><Keyword>like</Keyword><Normal Text>(arName)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  outAddr1                           </Normal Text><Keyword>like</Keyword><Normal Text>(arAdd1)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  outAddr2                           </Normal Text><Keyword>like</Keyword><Normal Text>(arAdd2)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  outCity                            </Normal Text><Keyword>like</Keyword><Normal Text>(arCity)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  outState                           </Normal Text><Keyword>like</Keyword><Normal Text>(arStte)</Normal Text><br/>
<Normal Text>     </Normal Text><Keyword>D</Keyword><Normal Text>  outZip                             </Normal Text><Keyword>like</Keyword><Normal Text>(arZip)</Normal Text><br/>
<Normal Text>     </Normal Text><Directive> /free</Directive><br/>
<Normal Text>       exec sql </Normal Text><Keyword>select</Keyword><Normal Text> arName, arAdd1, arAdd2, arCity, arStte, arZip</Normal Text><br/>
<Normal Text>                into  :outName, :outAddr1, :outAddr2, :outCity, :outState,</Normal Text><br/>
<Normal Text>                      :outZip</Normal Text><br/>
<Normal Text>                from   ARMSTF1</Normal Text><br/>
<Normal Text>                where  arCNum = :inCusNo</Normal Text><br/>
<Normal Text>                fetch first </Normal Text><Decimal>1</Decimal><Normal Text> row only</Normal Text><br/>
<Normal Text>                with CS</Normal Text><br/>
<Normal Text>                use currently committed;</Normal Text><br/>
<Normal Text>     </Normal Text><Directive> /end-free</Directive><br/>
<Normal Text>     </Normal Text><Keyword>P</Keyword><Normal Text> GetCustInf      E</Normal Text><br/>
