FMTFCODE 20050420 Copyright (c) Allegro Consultants, Inc. Author: Stan Sieler sieler@gmail.com FMTFCODE.PUB is a filecode mnemonic exploration program. Basic command: LIST ... lists all HP & user/vendor filecodes FMTFCODE.O and FMTFCODE.USL are compiled procedures containing filecode mnemonic helper routines, suitable for use by other programs. When MPE XL 3.0 was released, it was noticed that filecode mnemonics were not handled in only one location within the operating system. Instead, several different Native Mode (NM) routines and several different Compatibility Mode (CM) routines are used to parse (input) and format (output) filecode mnemonics. The result is that :LISTF reports one set of mnemonics, NM STORE another, CM STORE another, the ":HELP FILE,ALL" command another, and the :BUILD command yet another. No one set is a complete superset of the others. In fact, a few filecode numbers and mnemonics are switched between the different routines. A bit of background... on MPE/iX, most Native Mode (NM) code in the operating system uses a routine called "fcxlate" to convert a filecode to a mnemonic. (Another routine is used to do the opposite translation, but both use the same table of filecodes/mnemonics, so we need only concern ourselves with fcxlate.) This program (FMTFCODE) was written for two reasons: 1) to test what mnemonics actually work (i.e.: are recognized by the :FILE command); 2) to compare the mnemonics returned by the undocumented native mode routine fcxlate against those returned by the fmtfcode package written by Stan Sieler. (fmtfcode is a set non-privileged routines that returnsmnemonics for filecodes for all of the known MPE filecodes and for the common user & vendor filecodes). Later, a third motivation was added: 3) Construct source code that could be donated to HP to facilitate adopting the user/vendor mnemonics. The common user/vendor mnemonics are kept track of by SIGMPE, the Special Interest Group for MPE. Users or vendors who invent their own filecodes are requested to register their values & desired mnemonics with SIGMPEG. This can be done by contacting Stan Sieler at (408) 252-2330, or via email at sieler@gmail.com Some of the known problems involving filecodes on MPE XL 3.0 involve the following filecodes/mnemonics: 1247 BSVXL (reported by :LISTF & NM STORE as BSUXL) 1275 DFI (reported by :LISTF & NM STORE as DIF) 1437 RDICN (reported by :LISTF & NM STORE as RDILN) Filecode 1247 was fixed in MPE/iX 5.0, and the rest were fixed at least as of MPE/iX 6.0 Note: CM KSAM is not indicated by a filecode, but having filetype=1. :LISTF will report a file as being "KSAM" if it has a filecode = 0 AND is filetype 1, otherwise the filecode overrides the filetype. Strange but true. Filecode mnemonics that begin with lower case letters are not recognized as mnemonics by MPE/iX. They are a superset of MPE, and include TurboIMAGE PRIV mnemonics (e.g, iroot for -401), common user/vendor mnemonics (e.g, qedit for 111, squis for 711), and obsoleted MPE mnemonics (e.g., pfjob for 1257). The commands recognized by FMTFCODE are: CLEARREDO, DO, LISTREDO, REDO Similar to the CI's redo commands. By default, the redo editor is QZMODIFY, as seen in QEDIT. A "SET CIREDO" switches to the CI's redo (only available in the NM version of this program). BUILD [ALL] [BLANKS | NOBLANKS] [FILE filename] [PURGE] [STARTFCODE #] Builds a file for use by HP for integration into the CI source code. If "FILE" is omitted, the output is sent to $stdlist. COMPare Looks at filecodes 0 to 21074, comparing the mnemonic returned by MPE/iX's "fcxlate" routine (responsible for most NM filecode mnemonics) to Stan's mnemonic. If they are the same, nothing is printed (unless a debugging option is set). If they are different, they are listed to $stdlist. Exit Exits this program. EXPLAIN Prints an explanation of why some of Stan's mnemonics are displayed in lower case. FCXLATE filecode Calls MPE/iX's "fcxlate" routine and Stan's filecode_to_mnemonic routine, and displays the results. FILECODE FILECODE tests the specified mnemonic to see it is a "known" filecode, and (if so) reports the numeric value. FILECODE # reports the mnemonic for the specified filecode number (if any). If a "," followed by a number is given, then this is interpreted as the foptions value ... useful when trying to simulate what LISTF does for filecode of 0. (I.e., there is no real "KSAM" filecode ... a command of: FILECODE 0, %4000 will report a "filecode" of "KSAM", just like LISTF will report when it sees a KSAM file) Help Prints information about this program, including this list of commands. LISTall [DIFFER] [< VENDORs | HP | ALL>] [NEGative] [POSitive] Lists all filecodes that have mnemonics (other than "PRIV") in the range 0 to 21074. The list can be filtered with the various options. If DIFFER is specified (default for the COMPARE command), then only the mnemonics that differ between MPE/iX's fxclate and Stan's list of filecodes will be listed. If ALL (the default) is specified, then that's the same as specifying both VENDOR and HP. If HP is specified, then MPE/iX's mnemonics (from fcxlate) are listed. If VENDOR is specified, then the user/vendor mnemonics (from Stan's list) are listed. If neither HP nor VENDOR is specified, then both are assumed. If NEGATIVE is specified, only negative filecodes are listed. If POSTIIVE is specified, only positive filecodes are listed. RANGES List known user/vendor ranges (5xxx values are assigned by Stan, sieler@gmail.com). RESET options SET options Turns the specified debugging options off/on. Options: CIREDO SET CIREDO enables CI-style redo editing (only in NM version). MAXFCODE = #### SET MAXFCODE sets the value for the highest filecode tested. (The current maximum value known is 21074.) MINFCODE = #### SET MINFCODE sets the value for the lowest filecode tested. (The current maximum value known is -21074.) PAGING SET PAGING enables pagination of output (usually on by default for sessions). TEST [ ] Tests all of the mnemonics that the LISTALL command shows to see whether or not they appear to be valid. The test is done by issuing a file equate of the form FILE FCODETST;CODE=mnemonic If CI error 253 is returned, the mnemonic is not valid. By default, or if BOTH is specified, both MPE/iX's and Stan's mnemonics are tested. If VENDOR is specified, then only Stan's mnemonics will be tested. If XL is specified, then only MPE/iX's mnemonics will be tested. Mnemonics that fail are listed. VENDOR Lists all of the filecode mnemonics recognized by Stan's routine. The EXPLAIN command notes why some are lower case. XL Lists all of the filecode mnemonics returned by fcxlate, in the range 0 to 21074. Filecodes with no mnemonics, or with the mnemonic "PRIV" are not listed. // FMTFCODE 20141113 Copyright (c) Allegro Consultants, Inc.