Sample UEB12A

Sample

Input: Data Set Name am Terminal verlangen (LISTDSI)                                 
- muss PO sein!
Process: ???
Output: "Anzahl Members im " dataset":" nnn

/* REXX UEB12A Copyright YCOS Yves Colliard Software 1990-2009 */
/* TRACE ?R  */
  /* einschalten des interaktiven Trace Modus */
  /* */
DO FOREVER
   SAY "Bitte Data Set Name eingeben"
   PARSE UPPER EXTERNAL dsname      /* Anfrage an der Konsole     */
   IF dsname = "" THEN
      SAY "Falsche Eingabe"
   ELSE DO
      totest = "'"strip(dsname)"'"
      dscd = LISTDSI(totest "DIRECTORY") /* LISTDSI des Data Sets */
      IF dscd = 0 THEN
         IF SYSDSORG = "PO" THEN
            LEAVE
         ELSE
            SAY "Kein Partitioned Data Set, DSORG:" SYSDSORG
      ELSE DO
                                    /* LISTDSI nicht erfolgreich  */
         SAY "Fehler, beim" dsname "Data Set"
         SAY "Reason Code" SYSREASON
         SAY SYSMSGLVL1
         SAY SYSMSGLVL2
      END
  /* */
   END
  /* */
END
/* */
SAY "Anzahl Members im" dsname ":" SYSMEMBERS
/* */