CONVERT TO UPPERCASE


start figure

       ** Convert input string to uppercase .....PProcName+++++++..B...................Functions++++++++++++++++++++++++++++ 0056 P MakeUpper       B                   EXPORT       ** Convert the input string (parameter 1) to upper case .....DName+++++++++++EUDS.......Length+TDc.Functions++++++++++++++++++++++++++++ 0057 D MakeUpper       PI                  OPDESC 0058 D  InputStg                   4096A   OPTIONS(*VARSIZE) 0059 D  WorkVar        S                   LIKE(InputStg) 0060 D lower           C                   Const('abcdefghijklmnopqrstuvwxyz') 0061 D UPPER           C                   Const('ABCDEFGHIJKLMNOPQRSTUVWXYZ') 0062 D descType        S             10I 0 0063 D dataType        S             10I 0 0064 D descInf1        S             10I 0 0065 D descInf2        S             10I 0 0066 D strlen          S             10I 0 .....C*Rn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq.... 0068 C                   CALLP     CEEDOD(1 : descType : datatype : 0069 C                                       descInf1 : descInf2 : strlen) 0070 C                   Eval      workvar = %subst(InputStg : 1 : strlen) 0071 C     lower:UPPER   xLate     workvar       workval 0072 C                   Return    RtvValue 0073 C                   Eval      %subst(InputStg : 1 : strlen) = workvar 0074 C                   return .....P*rocName+++++++..B...................Functions++++++++++++++++++++++++++++ 0075 P MakeUpper       E 

end figure

Figure D.5: ZTOOLS example procedures— Convert to Uppercase.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net