Mantis Programming Standards
- Area:
- Languages
- Topic:
- Mantis Programming
- Standard:
- Production Mantis must be written according to specified guidelines.
Procedures:
Standard Aims Program Constructs
- Use standard heading; use ISYS:STD (password ISYS) as a model
- Use standard entry coding on ENTRY/EXIT (CNTL/PGM/RET_PARMS)
- Use GET_PARM and PUT_PARM where appropriate
- Where appropriate, use GET_PARM to fetch and automatically
display a screen on entry
- When exiting a program, store appropriate values using PUT_PARM
- Fully qualify all external names, e.g., ISYS:program_name
Program/Screen Interface
- Use only one CONVERSE per screen
- Use only one screen per program except when using windowing
- Use MAP as name for screen
- Do not change the default auto-skip character from the vertical bar
- Check modified data tags where appropriate
- Do not use the box/color/reverse/video/blinking/extended edit attributes
- Use ALARM of the ATTRIBUTE statement to indicate errors/end of lengthy
processes
Program/Screen Interface--Initialization
- Do not define screen variables in program
- Set date on program initialization
- Re-fetch the value of time before a CONVERSE MAP
- Clear message area and reset screen after a CONVERSE MAP
- Do not change value of "new application" field when using CLEAR MAP
- Do not change value(s) of key field(s) when using CLEAR MAP
Program/Screen Interface--Screen/Printer Output
- SHOW statement should always be used with OUTPUT PRINTER
- The usage of extended screens is recommended over SHOW
- Do not use the SCROLL ON or SCROLL OFF
- Use windowing only to request additional information
- Windows may be used for table lookup through an external DO
- Always use the SET option for a second logical screen
- If window on top of another screen, place vertical bars in all blank
spaces
- Do not use the WINDOW option of the CONVERSE statement
File Considerations
- Set TRAP ON for all files
- Use GET-EQUAL on VSAM files where appropriate
- For VSAM files, trap the NOTOPEN condition
- Use the external routine ISYS:ENTRY_IS_NOTOPEN to record file open errors
- Fetch records from a VSAM file only when the key changes
- Limit usage of automatic mapping, especially when using VSAM
Editing
- Edit in the order that fields occur on a screen
- Highlight all edit errors
- Display a message for any error
- Avoid hardcoding
- Put user associated functions in the table file
- Put key field on main screen; do not use separate screen to enter key
field
- Use one set of edits for both add and update
PF Key Usage
- Use PF1 or PF13 to update or add
- Use PF2 or PF14 to transfer to new application field
- PF3 and PF15 are reserved for the menu; avoid their usage
- PF4 and PF16 are reserved for index lookup where appropriate
- If TOP is legitimate paging option, use PF4/PF16 to page to top
- If the program uses top and indexing, use PF9/PF21 for indexing
- If BOTTOM is legitimate paging option, use PF5/PF17 to page to bottom
- Confirm delete requests with PF6
- Use PF7 and PF19 to page up
- Use PF8 and PF20 to page down
- Use PF10 or PF22 to place cursor in new application field
- Use PF11 or PF23 to print when appropriate
- Use PF12 or PF24 to invoke help screens (prompters)
- Use PA2 to return to the menu
- PA2 should be in next to last PF key position
- PF12/PF24 should be in last PF key position
Use the following PF key assignments for the full-screen editor:
- PF1/13 -- HELP
- PF2/14 -- REPLACE
- PF3/15 -- END
- PF4/16 -- TOP
- PF5/17 -- RFIND
- PF6/18 -- RCHANGE
- PF7/19 -- UP
- PF8/20 -- DOWN
- PF9/21 -- SEQUENCE 1000
- PF10/22 -- LEFT 40
- PF11/23 -- RIGHT 40
- PF12/24 -- RUN
Miscellaneous Considerations
- Name program, screen and prompter with same name where possible.
- Use std name xxx_fsss, where "xxx" is system/subsystem, "f" is
function and "sss" is seq #
- Program password should be the same as the library name
- Add a comment to all new programs when saving them
- All applications MUST have help screens
- Use one program for inquiry, update, add and delete
- In Full-Screen mode, set NULLS ON, INDENT ON and SCROLL HALF
- Do not use the BIND facility
- Do not change the PROFILE in full-screen program mode except
as indicated above
Standards
Last Modified:
©1999 All Rights Reserved