System REXX - REXX based on an IBM Sample

Sample
System REXX

Beispiel:                                 

/* REXX MYREXX1 Copyright YCOS Yves Colliard Software 2008-2009 */
/* TRACE ?R  */
  /* einschalten des interaktiven Trace Modus */
  /* */
/* MUST BE COPIED TO SYS1.SAXREXEC                                */
/* REXX based on an IBM Sample -                        */
/* MVS Programming: Authorized Assembler Services Guide */
NUMERIC DIGITS 25
ARG InJobname
if  InJobname="" then InJobname="RACF"
MyCmd = 'D JOBS,' !! Strip(InJobname)
Result =  AXRCMD(MyCmd,OutputVar.,10)
IF Result = 0 THEN
  DO
    OutAste# = ' '
    DO LineNum = 1 TO OutputVar.0 WHILE(OutASTE#=' ')
      PARSE var OutputVar.LineNum 'ASTE=' OutAste#
    END
    IF OutAste# = ' ' THEN
      DO
        MyRetcode = 8
        OutAste# = 0
      END
    ELSE
       MyRetcode = 0
  END
ELSE
  DO
    MyRetcode = 12
    OutAste# = 0
  END
EXIT MyRetcode