$EdScan: Difference between revisions
(Automatically generated page update) |
(Automatically generated page update) |
||
Line 111: | Line 111: | ||
<li>[[Janus Web Server]]</li> | <li>[[Janus Web Server]]</li> | ||
<li>[[Japanese functions]]</li> | <li>[[Japanese functions]]</li> | ||
<li>[ | <li>[http://m204wiki.rocketsoftware.com/images/4/4b/SirfieldNew.pdf Sir2000 Field Migration Facility]</li> | ||
</ul> | </ul> | ||
<p> | <p> |
Revision as of 17:23, 13 September 2013
Scan list of entities in online
Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $EdScan function.
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
%result = $EdScan(image_name, [type], [scope], [name])
%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.
Status codes
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
Example
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
- Sirius functions
- Fast/Unload User Language Interface
- Janus Open Client
- Janus Open Server
- Janus Sockets
- Janus Web Server
- Japanese functions
- Sir2000 Field Migration Facility