Previous Topic
Table Of Contents
Parent Topic
Next Topic

The SWSFREE Function

Related Topics

Web Server API Function Index


May be used in Shadow/REXX
May be used from Other REXX Interpreters
High-level Language Interface available

The REXX-language SWSFREE built-in function can be used to dynamically unallocate datasets.

Note: Because of comparable functionality of SWSFREE to IBM's FREE function, this documentation is similar to IBM's TSO/E online help.

SWSFREE Syntax

The format of this command is similar in features and functions to the TSO/E Free command.

In the event of an error, the REXX variable, ALLOC.MESSAGE, will be populated with a descriptive message. The DAIR return code may be obtained from ALLOC.INFOCODE and the reason code may be obtained from the ALLOC.REASON.

The general form for a REXX-language invocation of SWSFREE is:


   rc = SWSFREE("STRING")

Valid Arguments are:

DSN(DSNAME) Specifies the name of the dataset to be de-allocated. You may only specify a single dataset name.

Dataset names must be fully qualified as there will be no prefix appended to the supplied name.

PATH(PATHNAME) Identifies an HFS file to be de-allocated.

A pathname consists of the names of the directories from the root to the file being identified, and then the name of the file. The form is /NAME1/NAME2/.../NAMEn.

A pathname begins with a slash (/). The system treats any consecutive slashes like a single slash.

The pathname can be 1 to 250 characters. A name can be 1 to 249 characters.

Consists of printable characters from x'40' through x'FE'.

A pathname is case sensitive. Thus, /usr/joe and /USR/joe define two different files.

DDN(DDNAME) Specifies the DDNAME,of the datasets, to be de-allocated.

This is a required field.

MEMBER(VALUE) Specifies the member name of a dataset to allocate or it may also be the relative Generation Data Group number of the dataset.

Examples:

     DSN(SYS1.PROCLIB) MEMBER(JES2)
     DSN(ANY.BASE.DSN) MEMBER(+1)
 

Note: Generation dataset relative numbers are not catalogued until the dataset is de-allocated or the Shadow OS/390 Web Server address space is terminated.

DEST(DESTINATION/NODE USERID) Remote destination or a User at a specified node to which SYSOUT data sets are to be routed.
OUTDES(OUTPUT_DESCRIPTOR_NAME ...) Specifies a list of output descriptors that will be associated with the sysout data set. These descriptors are created by //OUTPUT JCL statements in the Shadow OS/390 Web Server or Shadow Direct procedure.

Note: Separate parameters by spaces. Do not use commas.

SYSOUT(CLASS) Dataset is to be a system output dataset
DISP(NORMAL) Specifies the disposition of file upon de-allocation.

Use one of the following dispositions:

  • UNCATALOG = Specifies that the file should be uncatalogued
  • CATALOG = Specifies that the file should be catalog
  • KEEP = Specifies that the file should be kept.
  • DELETE = Specifies that the file should be deleted.
HOLD Dataset is to be placed on a hold queue upon de-allocation
NOHOLD Dataset is not to be placed on a hold queue upon unallocation
PATHDISP(NORMAL) Specifies the disposition of an HFS file upon normal session termination.

Use one of the following dispositions:

  • KEEP = Specifies that the file should be kept.
  • DELETE = Specifies that the file should be deleted.
SPIN(VALUE) Specifies when a sysout data set is printed.

Legitimate values are:

  • UNALLOC = Makes the dataset available for printing immediately after the dataset is unallocated from an explicit unallocation or at the end of the session.
  • NO = Makes the dataset available for printing at the end of the session.
MESSAGE(VALUE) Specifies whether or not to display dynamic allocation failure messages on the system console. This value overrides the user-specifiable system default (See FILEMESSAGES).

Legitimate values are:

  • YES = Display dynamic allocation failure messages
  • NO = Do not display dynamic allocation failure messages
MOUNT(VALUE) Specifies whether to allow or not allow a volume to be mounted in order to satisfy a dynamic allocation request. This value overrides the user-specifiable system default. (See FILEMOUNT)

Legitimate values are:

  • YES = Allow the system to mount a volume to satisfy a dynamic allocation request.
  • NO = Do not allow the system to mount a volume to satisfy a dynamic allocation request.
RECALL(VALUE) Specifies whether to allow or not allow the system to recall a migrated dataset in order to satisfy a dynamic allocation request. This value overrides the user-specifiable system default. (See FILERECALL)

Legitimate values are:

  • YES = Allow the system to recall datasets to satisfy a dynamic allocation request.
  • NO = Do not allow the system to recall datasets to satisfy a dynamic allocation request.  

SWSFREE Examples


 
 
    To free a specific DSName:
 
    rc = SWSFREE("DSN(MYPFX.DSNAME)")
 
    To free a specific DDName:
 
    rc = SWSFREE("DDN(INFILE)")
 
 
    To route a file to sysout:
 
    rc = SWSFREE("DDN(PRTFILE) SYSOUT(A)")
 

Top