LISTDSI - List Data Set Informationen

REXX TSO und MVS Built-In Funktionen

Syntax:                                 
LISTDSI(dsn   [location] [dir] [rec] [sms])
LISTDSI(filen FILE       [dir] [rec] [sms])
===> Result + Variablen
location - VOLUME(  ) / PREALLOC
dir - NODIRECTORY / DIRECTORY (Default NODIRECTORY)
rec - RECALL / NORECALL (Default RECALL only from DASD)
sms - NOSMSINFO / SMSINFO (Default NOSMSINFO)

/* REXX LISTDSI Copyright YCOS Yves Colliard Software 1990-2009 */
/* TRACE ?R  */
  /* einschalten des interaktiven Trace Modus */
  /* */
ds1 = "'SYS1.LINKLIB'"
ds2 = "'SYS1.SAMPLIB'"
ds3 = "SYSPROC"
ds4 = "'DAS.GIBT.ES.NICHT'"
  /* */
dscd = LISTDSI(ds1)                  /* LISTDSI des ds1 Data Sets */
IF dscd = 0 THEN
   CALL ausgabe
ELSE DO
   SAY "Fehler, beim" ds1 "Data Set" /* LISTDSI nicht erfolgreich */
   SAY "Reason Code" SYSREASON
   SAY SYSMSGLVL1
   SAY SYSMSGLVL2
END
  /* */
dscd = LISTDSI(ds2 "NORECALL")       /* LISTDSI des ds2 Data Sets */
                                  /* kein HSM Einsatz erwuenscht  */
IF dscd = 0 THEN
   CALL ausgabe
ELSE DO
   SAY "Fehler, beim" ds2 "Data Set" /* LISTDSI nicht erfolgreich */
   SAY "Reason Code" SYSREASON
   SAY SYSMSGLVL1
   SAY SYSMSGLVL2
END
  /* */
dscd = LISTDSI(ds3 "FILE DIRECTORY") /* LISTDSI des ds3 Data Sets */
                                  /* FILE = ddname Eingabe        */
                                  /* DIRECTORY Informationen      */
IF dscd = 0 THEN
   CALL ausgabe
ELSE DO
   SAY "Fehler, beim" ds3 "Data Set" /* LISTDSI nicht erfolgreich */
   SAY "Reason Code" SYSREASON
   SAY SYSMSGLVL1
   SAY SYSMSGLVL2
END
  /* */
dscd = LISTDSI(ds4)                  /* LISTDSI des ds4 Data Sets */
IF dscd = 0 THEN
   CALL ausgabe
ELSE DO
   SAY "Fehler, beim" ds4 "Data Set" /* LISTDSI nicht erfolgreich */
   SAY "Reason Code" SYSREASON
   SAY SYSMSGLVL1
   SAY SYSMSGLVL2
END
  /* */
EXIT
  /* */
ausgabe:
  /* */
SAY "Data Set Name:" SYSDSNAME
SAY "     auf Volume:" SYSVOLUME "  Unit:" SYSUNIT
SAY "     DSORG:" SYSDSORG "  RECFM:" SYSRECFM
SAY "     LRECL:" SYSLRECL "  BLKSIZE:" SYSBLKSIZE "  KEYL:" SYSKEYLEN
SAY "     "SYSALLOC SYSUNITS "Allocated," SYSUSED SYSUNITS "Used"
SAY "     Allocation, primary:" SYSPRIMARY "  secondary:" SYSSECONDS
SAY "     In" SYSEXTENTS "Extents"
SAY "     Created:" SYSCREATE "  Referenced:" SYSREFDATE
SAY "     Expiration Date:" SYSEXDATE
SAY "     "SYSPASSWORD "Password," SYSRACFA "RACF Protection"
SAY "     Data Set changed:" SYSUPDATED
SAY "     This Unit as" SYSTRKSCYL "Tracks per Cylnder"
SAY "              and" SYSBLKSTRK "Blocks per Track"
SAY "     Data Set Type:" SYSSEQDSNTYPE
IF SYSADIRBLK <> "" THEN DO
   SAY "     "SYSADIRBLK "Directory Blocks allocated"
   SAY "     "SYSUDIRBLK "Directory Blocks used"
   SAY "     "SYSMEMBERS "Members"
END
  /* */
RETURN
/* */