Using Functions Pg. 5-54 :
DEFINE FILE ...
-*** First trim the trailing blanks...
FLD1_TRIM/A28V = TRIMV('T', ORIGINAL_FLD, 28, ' ', 1, FLD1);
-*** Then find the true length of the data...
FLD1_LGTH/I2 = LENV(FLD1_TRIM, FLD1_LGTH);
-*** Calculate the Starting Position...
FLD1_START/I2 = FLD1_LGTH - 2 ;
-*** Substring to get the result...
FLD1_LAST2/A2 = SUBSTV(28, ORIGINAL_FLD, FLD1_START, FLD1_LGTH, FLD1_LAST2);
END
WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL