GEFCON 10 - get file/device info for FCB(s).

Usage:

.
Normal get information:
   eaq    fcblst    Point to chain of FCBs
   mme    GEFCON
 
Update PAT reel:
   eaq    fcb       ^ single FCB with new reel number
   orq    .FBT18,dl
   mme    GEFCON
 
Update PAT density:
   eaq    fcb       point to single FCB 
   orq    .FBT19+dencod,dl
   mme    GEFCON
 
Get/check FNIT type label:
   eaq    fnitfb    Point to FNIT type FCB
   mme    GEFCON
   tra    notnit    Not FNIT type tape PAT
   tra    fnokay    Filename checked or fetched
   tra    fnfail    Filename check failed

Where:

fcblst
is the address of a the first FCB in a chain of FCBs which are to be updated with information for the file codes. The file serial number fields (FCB word -7) should be zero. The BCD characters `fnit` must NOT appear in bits 0-23 of word -7 of any of the FCB's.
fcb
is the address of a single FCB for a file code whose PAT is to be updated. Normally, the FCB would not be chained to other FCBs. However, if it is, the chain may initially scanned for bad chain pointers, but only the first FCB will be processed. Again, the file serial number field must NOT have the BCD characters `fnit`.
fnitfb
is the address of a "File Name Identified Tape" (FNIT) style FCB. An FNIT type FCB has the BCD characters `fnit` in bits 0-23 of the the file serial number field (FCB word -7). Normally, the FCB would not be chained to other FCBs. However, if it is, the chain may initially scanned for bad chain pointers, but only the first FCB will be processed.
.FBT18
is a constant with the value 0400000 (Bit 18). If this bit is set in the Q register, a tape PAT will be updated with the reel number from the file serial number field of the FCB. (bits 0-30 of FCB word -7).
.FBT19
is a constant with the value 0200000 (Bit 19). If this bit is set in the Q register the density of code in the PAT will be updated with the density code with 'dencod'.
dencod
a 4 bit density code used to update the density field in the PAT. See "expl mme gefadd" or "expl b bmac fildes" for a list of the 4 bit density code values.

Description:

MME GEFCON is normally used to obtain run time information about about files and devices associated with one or more file codes. I.e it is used to obtain the characteristics of file codes specified at runtime by the JCL. In addition to this "get information" function, MME GEFCON has 3 special functions for tape file codes. See below for more information.

Since MME GEFCON was originally intended to be used by the GFRC i/o package, it takes input from, and stores results into, GFRC style file control blocks (FCBs). Multiple file codes can be processed by building a chain of FCBs linked through the "next FCB" field (bits 0-17 of FCB word -1). If more than one FCB is specified in this way, MME GEFCON always checks the forward pointers for all FCBs in the chain before it tests to see what type of function it is performing. For the special tape functions, although the entire FCB chain is scanned, only the first FCB is actually processed. For all functions, the file code being processed is obtained from the FCB file code field (bits 24-35 of word -4).

Normal get information request

This function fills in information about the file code for each FCB in the chain. Depending the type of file code different fields on the FCB may be filled in.

All Devices
File code present, bit 18 word -5
This bit will be set if the file code is present and does not represent a released file or device. The user should clear this bit calling MME GEFCON in order to tell if the file code is assigned, since GCOS does not neccesarily clear it for unused file codes. If this bit is not set by GCOS, no other output fields will be meaningful.
File code type, bits 26-29 word 0
One of the following octal codes will be stored in this field.
00 -- central site sysout.
02 -- magnetic tape.
04 -- obsolete, was 40-word sector drum
05 -- sysout.
06 -- 64-word sector disc file.
07 -- conversational device ($DAC).
10 -- card reader.
12 -- printer.
13 -- console ($TYPE).
14 -- obsolete, was paper tape.
16 -- card punch.
Physical address, bits 18-35 word -1
For all except pseudo-devices ($DAC and sysout), MME GEFCON stores device address information here. This data is formatted the same as bits 6-23 of the Q register from MME GEFADD. I.e. The value stored is the same as if you did a MME GEFADD, shifted the Q right by 12 bits and stored the lower 18 bits into the lower 18 bits of FCB word -1.
Sysout file codes
Bit 25 of word 0 will be set if this is a sysout file code. This bit will be cleared for non-sysout file codes. Note that the offical documentation says that a type code of 05 (bits 26-29) indicates a "remote device". This is somewhat misleading, since it really means "remote sysout". Also, these days almost no jobs originate at a physical card reader directly connected to the main system, so most sysout file codes will be marked "remote sysout" (type 05). About the only way to get a type 00 code is to use a $SYSOUT card without a destination code field. Since there is no programming difference between remote and central sysout, programs generally ignore the type code and just check bit 25. Contrary to some documentation, bit 23 is always set to zero; it is not set to 1 for type 05.
Conversational devices
Note that a $DAC control card does not actually connect a terminal to the program. It is up to the program to recognize the result from MME GEFCON for the specified file code, and then do the appropriate MME GEROUT calls.
Unit designator, bits 24-29 word -1
A single BCD character taken from the second field of the $DAC card; if there was no explicit second field, a blank is returned. By convention, this character is appended to the snumb of the job to generate the MME GEROUT remote inquiry name.
Magnetic Tapes
File Serial Number, bits 0-29 word -7
the file serial number from the PAT is stored here. If the PAT is marked as not having a reel number (PAT word 2 bit 18 is zero), then `99999` will be stored.
Starting Reel Index, bits 20-35 word -6
For multi-reel tape files, the user may want to start processing with one of the follow-on reels. He requests this by coding the starting reel sequence number on the $TAPE card. The value from the $TAPE card is used when GCOS builds the PAT, and MME GEFCON copies it from the PAT to the FCB. Although, MME GEFCON stores 16 bits, the intermediate field in the PAT is only 9 bits, so result will never be larger than 511. The starting reel index is never less than 1; if the PAT happens to contain zero, MME GEFCON will change the value in the PAT to one before copying to the FCB.
non-7 track indicator, bit 24 word 0
This field will be set to zero in the unlikely event that a 7 track tape drive is assigned to the file code. Normally, it will be a 1 indicating some other type tape (9 track or cartridge).
Dismount code, bit 29 word -5
This gets the lower bit of the two bit normal disposition code. No information is returned about the abort disposition. It is not clear that this is very useful since release (R) will set the bit to zero, and dismount (D) will set the bit to 1, but in both cases GCOS will dismount the tape. It might be useful it you knew that the user would restrict himself to save or dismount dispositions. If it is important, use MME GEFADD to obtain the full 2 bit disposition code.
Disc files
File size, word -7
For historical reasons, this field has a funny encoding in terms of links and llinks in final partial link.
upper = FCB[-7]>>18;     /* LLinks in last link */
lower = FCB[-7]&0777777; /* Links-1 + upper */
if (0 > FCB[-7])
    /* New format for large files */
    llinks = FCB[-7] & 0377777777777;
else
    /* Older format */
    llinks = (lower - upper) * 12 + upper;
Mode, bit 24 word 0
This will be 0 for sequential files, and 1 for random.

Update PAT tape number

This function of MME GEFCON is indicated by setting bit 18 in the Q register before the call. Only 1 FCB is processed, and the file serial number is copied from the field in FCB word -7 to the PAT. The call will be ignored if this is not a tape file code. Updating the PAT like this would normally be done after a tape had been dismounted and a tape for a new file was remounted. This would ensure that any accounting records, reflected the new tape file. In particular, the GEPR accounting records reflect the tape number in the PAT when I/O errors occur.

When dealing with a multi-reel tape file, the PAT is not normally updated when switching to continuation reels. The PAT should reflect the starting reel of the file, the "file serial number". This is needed so that if the file is passed to later job steps, they can determine the tape to start processing with. This convention does have the unfortunate side effect that the GEPR error records only identify the set of reels holding the file, and not the particular reel within the set that had the error.

Update PAT tape density

To use this function, bit 19 of the Q register is set to 1, and bits 32-35 are set to the density code register before the call. Only 1 FCB is processed, and the 4 bit density is copied to the PAT. The call will be ignored if this is not a tape file code.

Updating the PAT does not directly affect the tape drive density. However, some GCOS label modules will use the density setting from the PAT and issue the appropriate specific set density I/O call. Also the generic set tape density I/O command SHD, will be mapped to the specific set density command needed to produce the density currently specified in the PAT.

FNIT Tapes

"File Name Identified Tapes" was an old optional GFRC technique to manage a tape library using the 12 character file name field instead of the 5 character tape serial number. The technique is incompatible with TMS.

For this to work, the $TAPE JCL statement must take the form

$  TAPE   OT,X1S,,99999,,filename-nnn
where "filename-nnn" is any combination of 1-8 alphanumeric characters followed by "-" and 1-3 digits. The "filename" part is the name that identifies the file, and the "nnn" is the generation sequence number.

The FNIT style MME GEFCON checks that the PAT was generated by such a $TAPE card. It verifies that the file serial field is "99999", and that the filename is of the form "filename-nnn". It also checks that this is not an TMS system. If any of these checks fail is returns to the MME+1 location (tra notnit).

It those tests pass it then checks the FCB to see if it should copy to "filename-nnn" to the FCB, or compare the value in the FCB with the PAT. If it copies to the FCB, or if it compares and the then it returned to the MME+2 location (tra fnokay). If the compare fails, return is to the MME+3 location (tra fnfail).

File Serial number, word -7
This should contain the BCD characters `fnit00`. Note that although the MME manual specifies the value for the full word, the current implementation only tests bits 0-23 (`fnit`), and ignores the lower 12 bits.
FNIT file name, words -6 and -5
If this field is all zeros, the file name is copied from the PAT into this field. The value obtained would then normally be used to fill in the filename for an output tape label that is to be written. If this field is not zero, it should contain the filename value from an input tape label that was just read. MME GEFCON will compare this with the value in the PAT.

Note that the FNIT file name field (words -6 and -5) is not the normal GFRC FCB file name field (words -10 and -9).

See Also:

expl mme gefadd
for the format of the device address, disposition code values, and tape density codes.

Copyright © 2000, Thinkage Ltd.