Allocate Free

Allgemein

Beispiel:                                 

/* REXX ALLOCATE Copyright YCOS Yves Colliard Software 1990-2009 */
/* TRACE ?R  */
  /* einschalten des interaktiven Trace Modus */
  /* */
meindat = "YVES.YCOS.CLIST(exrout)"
             /* Eigenen Data Set Namen eingeben           */
"ALLOCATE FI(MYFILE) DA('"meindat"') SHR REUSE"
IF rc <> 0 THEN DO
   SAY 'Falscher Data Set Name!' meindat '-' rc
   EXIT
END
  /* */
'FREE FI(MYFILE)'
/* ------------------------------------------------------ */
meindat = "YVES.YCOS.NEWDS"
             /* Neuen Data Set Namen eingeben             */
"ALLOCATE FI(MYFILE) DA('"meindat"') NEW CATALOG",
         "TRACKS SPACE(5 5) RECFM(F B) LRECL(80) DSORG(PS)"
IF rc <> 0 THEN DO
   SAY 'Allocation Error!' meindat '-' rc
   EXIT
END
  /* */
'FREE FI(MYFILE)'
/* ------------------------------------------------------ */
"ALLOCATE FI(MYFILE) SYSOUT(A)"
IF rc <> 0 THEN DO
   SAY 'Allocation Error SYSOUT(A)!' rc
   EXIT
END
  /* */
'FREE FI(MYFILE)'