$EdScan

From m204wiki
Revision as of 17:35, 28 January 2011 by 198.242.244.47 (talk) (Created page with "{{DISPLAYTITLE:$EdScan}} <span class="pageSubtitle"><section begin="desc" />Scan list of entities in online<section end="desc" /></span> <p class="warning">Most Sirius $function...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin="desc" />Scan list of entities in online<section end="desc" />

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $EdScan function is to be entered.

This function scans the list of defined entities in the online region. Entities can be 204 datasets, sequential files or streams, printers, punches or processes.

The $EdScan function accepts four arguments and returns a number indicating the success of the function.

Syntax

<section begin="syntax" /> %RESULT = $EdScan(image_name, type, scope, name) <section end="syntax" />

$EdScan Function

%RESULT is a 0 or to an error code.

  • The first argument is a string identifying an image to receive returned data. This image must have the following format :

    IMAGE EB_IMAGE LOOP_VAR IS BINARY LEN 4 NAME IS STRING LEN 8 SCOPE IS STRING LEN 6 TYPE IS STRING LEN 8 * THIS SECTION USED JUST FOR DATASETS + ALLOCATES DSNAME IS STRING LEN 44 DSORG IS STRING LEN 10 ALLOC IS STRING LEN 4 DISP IS STRING LEN 5 * THIS SECTION JUST USED FOR PRINTERS + PUNCHES CLASS IS STRING LEN 1 ROUTE IS STRING LEN 8 ID IS STRING LEN 8 DIST IS STRING LEN 8 FORMS IS STRING LEN 8 * THIS SECTION JUST USED FOR LINKS TRANSPORT IS STRING LEN 8 AT DSNAME PROTOCOL IS STRING LEN 8 * THIS SECTION JUST USED FOR PROCESSES DESTINATION IS STRING LEN 8 AT DSNAME PARTNER IS STRING LEN 10 MODE IS STRING LEN 4 * THIS SECTION JUST USED FOR PROCESSGROUPS LINK IS STRING LEN 8 AT DSNAME REMOTEID IS STRING LEN 8 TERMINAL IS STRING LEN 8 END IMAGE

    ALLOC will return either NEW, OLD or COND and DISP returns either SHARE or EXCL. This is a required argument.

  • The second argument is a string indicating the type of entity for which information is to be returned. Valid types are
    ALLOCATE Files allocated by the ALLOCATE command.
    DATASET Files defined by the DEFINE DATASET command.
    PRINTER Printers defined by the DEFINE PRINTER command.
    PUNCH Punches defined by the DEFINE PUNCH command.
    STREAM Files defined by the DEFINE STREAM command.
    PROCESS Processes defined by the DEFINE PROCESS command.

    This is an optional argument.

  • The third argument is a string indicating the scope of the entities for which information is to be returned. Valid scopes are 'SYSTEM' and 'USER'. This is an optional argument. If not specified, all entities are returned.
  • The fourth argument is the name of the entity for which information is to be returned. This is an optional argument but if it is specified, arguments 2 and 3 are also required.


In the image indicated by argument 1, LOOP_VAR must be set to the number of entries matching the selection criterion that are to be skipped. Upon return, $EdScan will set LOOP_VAR to the number of entries skipped plus one if an entity is returned and to the number of entries skipped if not. Thus, multiple invocations of $EdScan without setting LOOP_VAR will return information on all appropriate entities.

0 - Entity found, image set 4 - Entity not found, or off end of chain 8 - Invalid argument 1 or argument 2 12 - Argument 4 specified without argument 2 or 3 16 - Image specified by argument 1 not found 20 - Image specified by argument 1 not active, or too short

$EdScan return codes


The following program prints the DD and DSNAME of all ALLOCATE'd datasets.

B IMAGE JUNK LOOP_VAR IS BINARY LEN 4 ... END IMAGE PREPARE IMAGE JUNK REPEAT FOREVER %RC = $EdScan('JUNK', 'ALLOCATE', 'SYSTEM') IF %RC ^= 0 THEN STOP END IF PRINT %JUNK:NAME AND %JUNK:DSNAME END REPEAT END

Products authorizing $EdScan