/* rexx */ /*-------------------------------------------------------------------*/ /* */ /* REXX Exec : PROPER */ /* */ /* Description : This subroutine will return a string in Proper */ /* name format i.e. Abbydale */ /* */ /* Created on : 27 Jun 2018 */ /* Created by : KEVIN FERGUSON */ /* : Userid(MIT001) */ /* : using ABBYDALE.PROD.REXX(PROPER) */ /* */ /* Called by : Anything */ /* */ /* Calls : */ /* */ /* Change Activity : */ /* */ /* ©Copyright of Abbydale Systems LLC. */ /* */ /*-------------------------------------------------------------------*/ signal on novalue /* un-initialized vars*/ signal on halt /* attention key */ Proper: Orig = ARG(1) if length(orig) > 1 then do /* Ensure there is more than one char */ UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" LOWER = "abcdefghijklmnopqrstuvwxyz" tempName = TRANSLATE(Orig,LOWER,UPPER) build = substr(tempName,2,Length(tempName)-1) initial = substr(tempName,1,1) initial = TRANSLATE(initial,UPPER,LOWER) newname = initial||build end else do newname = Orig end return newname /*-------------------------------------------------------------------*/ /* Trap NOVALUE Condition */ /*-------------------------------------------------------------------*/ novalue: say "NOVALUE entered from line" sigl say condition("D") say "The instruction is suppressed" address "TSO" "delstack" exit(16) /*-------------------------------------------------------------------*/ /* Trap HALT Condition */ /*-------------------------------------------------------------------*/ halt: say "HALT acknowledged in line" sigl say "Cleanup processing in progress" address "TSO" "delstack" exit(16) /*-------------------------------------------------------------------*/ /* End of PROPER */ /*-------------------------------------------------------------------*/