Skip to content

Sample REXX EXEC CMN010 XML Print Output

/* print output lines */

Output_Result:
  do ix=1 to SER2.result.0                            (see Note 1)
    ctSimple    = formit(SER2.totalsBySimpleLevel.ix) (see Note 2)
    ctComplex   = formit(SER2.totalsByComplexLevel.ix) 
    ctSuper     = formit(SER2.totalsBySuperLevel.ix) 
    ctPart      = formit(SER2.totalsByPartLevel.ix) 
    ctPlanPerm  = formit(SER2.totalsByPlannedPermType.ix) 
    ctPlanTemp  = formit(SER2.totalsByPlannedTempType.ix) 
    ctUnplanPerm= formit(SER2.totalsByUnplannedPermType.ix) 
    ctUnplanTemp= formit(SER2.totalsByUnplannedTempType.ix) 
    call Print_Line left(SER1.applname.jx,11), 
         right(ctSimple,8), 
         right(ctComplex,8), 
         right(ctSuper,8), 
         right(ctPart,13), 
         right(ctPlanPerm,9), 
         right(ctPlanTemp,9), 
         right(ctUnplanPerm,9), 
         right(ctUnplanTemp,9) 
/* keep running totals */
    GTSimple =GTSimple+ctSimple
    GTComplex=GTComplex+ctComplex
    GTSuper  =GTSuper+ctSuper
    GTPart   =GTPart+ctPart
    GTPPerm  =GTPPerm+ctPlanPerm
    GTPTemp  =GTPTemp+ctPlanTemp
    GTUPerm  =GTUPerm+ctUnplanPerm 
    GTUTemp  =GTUTemp+ctUnplanTemp 
  end 
Return

Notes

  1. Stem.result.0 is the number of results.

  2. Stem.result.1 is the first result. Stem.result.2 is the 2nd and so on.