home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / k / kp5.zip / KP5PAKC.EXE / KP5.HLP
Text File  |  1992-03-03  |  68KB  |  1,501 lines

  1. >Introduction
  2. ┌───────────────────────────────────────────┐
  3. │ KP5 Help Document                         │
  4. │ Copyright (c) 1991 by Peter Charpentier   │
  5. └───────────────────────────────────────────┘
  6.  
  7. Documentation for KP5 version 5.07, January 1992.
  8.  
  9. This document describes the features and use of KP5, a keypunch
  10. system for PC's and compatibles. It is included in the KP5 package
  11. as KP5.DOC, and is also available online through the KP5 HELP
  12. system.
  13.  
  14. KP5 is being distributed as shareware. This means that you are free
  15. to try it out and pass it around, as long as it is understood that
  16. if you decide to use it, you must register (and pay for) your copy.
  17. Registered users are entitled to technical support and free
  18. upgrades. If you do not have the registration form and disclaimer
  19. (REGISTER.DOC), write to me, on paper or electronically, at the
  20. address given in the "How to get HELP" section of this document.
  21.  
  22. This document is arranged as a set of 'topics' that describe the
  23. day-to-day use of KP5.
  24.  
  25. I suppose that the way to begin describing this program is to state
  26. what it IS, and what it is NOT, and where it belongs in a typical
  27. data management operation.
  28.  
  29. WHAT IT IS:
  30.  
  31. KP5 is a two-pass data entry editor. It was designed to facilitate
  32. the rapid and accurate entry and verification of data from well-
  33. designed data collection instruments. The end products are ASCII
  34. text files that may be processed by statistical or flat-file data
  35. management packages.
  36.  
  37. WHAT IT IS NOT:
  38.  
  39. KP5 is not a general data base management program, although it has
  40. within it a number of functions that are used to manage KP5 files.
  41. KP5 is not a forms-style data entry program: you cannot
  42. (efficiently) design data entry screens that resemble the data
  43. collection forms, nor can you build a computer-assisted
  44. interviewing system around KP5. If you require this type of data
  45. entry support, you should use one of the commercial database
  46. packages.
  47.  
  48. WHERE IT BELONGS:
  49.  
  50. KP5 is typically used as a data entry component in data management
  51. systems for survey research projects. In such operations,
  52. administrative functions -- anything involving subject contacts --
  53. are managed using one of the commercial, business-oriented data
  54. base packages (FoxPro, Paradox, etc.).  The volumes of research
  55. data from interviews are entered and verified using KP5, then
  56. regularly 'exported' to ASCII files. A statistical or flat-file
  57. management package, SAS, for example, takes over from there, and is
  58. used to maintain the master files for analysis.
  59.  
  60. Because of the cost and training involved with specialized key-to-
  61. disk machines, many research projects now use service bureaus for
  62. large batches of data. KP5 provides an alternative: using KP5 on
  63. your own equipment, through data entry structures that you have
  64. designed and understand, brings the entire data flow under your
  65. control. The error detection and correction cycle can be as tight
  66. as possible, because newly entered and verified records are
  67. immediately available for processing. Quality control is up to you,
  68. not an outside agency.
  69.  
  70. Some features:
  71.  
  72.    o All functions are accessed using a single set of drop-down
  73.      menus.
  74.  
  75.    o Record sizes can be gigantic (32,000 characters).
  76.  
  77.    o No reasonable limit on file size.
  78.  
  79.    o A file may be set up in a matter of minutes.
  80.  
  81.    o Partial or 100% verification is supported.
  82.  
  83.    o A 'picture' may be designed that edits data type on input.
  84.  
  85.    o Data may be automatically duplicated between or within
  86.      records.
  87.  
  88.    o Record keys may be made up of up to 255 characters among up to
  89.      10 fields located anywhere within the record.
  90.  
  91.    o Two-level range checking is supported. Any single or multiple
  92.      character field may be defined to have a valid-value range, as
  93.      well as a missing-value range.
  94.  
  95.    o Files may be password-protected.
  96.  
  97.    o Record keys may be validated against a master index file as
  98.      they are entered.
  99.  
  100.    o KP5 data sets may be restructured, copied, merged, imported
  101.      from ASCII files, and emptied.
  102.  
  103.    o Session statistics are automatically saved to disk, in dBase-
  104.      III or ASCII text format.
  105.  
  106.    o Will work on floppy-disk systems with 350K memory (400K
  107.      recommended).
  108.  
  109.    o KP5 is 'operator-tolerant': failure to properly exit the
  110.      program should not result in data loss.
  111. >What's New
  112. This section describes new features since version 5.05 (the first
  113. general distribution version of KP5).
  114.  
  115. Version        New features                  See topic:
  116.  
  117. 5.06           New UTILITES menu options:    ■The UTILITIES menu
  118. Oct 1991       -Delete Exported
  119.                -Global Flag Set
  120.  
  121. 5.07           Numeric data entry fields     ■Numeric fields
  122. Jan 1992       are now supported.
  123.  
  124.                dBase-III or ASCII            ■Session statistics
  125.                'session statistics' files     files
  126.                automatically written.
  127.  
  128.                New FILE menu option:         ■Shelling to DOS
  129.                -Shell to DOS
  130.  
  131.                Verification 'bypass'         ■The TABS mask
  132.                fields may be defined,         element
  133.                for which verification
  134.                is not enforced.
  135. >How to Start KP5
  136. This discussion assumes that KP5 has been installed on a hard disk.
  137. If you are using floppies, refer to the text file README.DOC for
  138. suggestions on how to use floppy diskettes. Assuming KP5 has been
  139. properly installed, and the program directory is on the
  140. workstation's PATH, the simplest way to start KP5 is to issue the
  141. command:
  142.  
  143.       ┌────────────┐
  144.       │   kp5      │
  145.       └────────────┘
  146.  
  147. If the KP5 program directory is NOT in the PATH, you would have to
  148. include the program directory in the command:
  149.  
  150.       ┌───────────────┐
  151.       │   c:\kp5\kp5  │
  152.       └───────────────┘
  153.  
  154. This will load the program with no files open, so you will have to
  155. select Open from the FILE menu in order to get to work (more on
  156. that below).
  157.  
  158. You may also specify, on the command line, which KP5 file you wish
  159. to process:
  160.  
  161.       ┌─────────────────────────┐
  162.       │  kp5 filename username  │
  163.       └─────────────────────────┘
  164.  
  165. In this syntax, filename is the DOS path plus KP file name, and
  166. username is you (1-10 characters). For example:
  167.  
  168.       ┌──────────────────────────────────┐
  169.       │  kp5 \kp5\files\studyx theodore  │
  170.       └──────────────────────────────────┘
  171.  
  172.  
  173. DOS Note: If no username is given, KP5 looks for a DOS environment
  174.           variable named USERNAME. If it is defined, KP5 will use
  175.           it, and not prompt the user. You use the SET command to
  176.           define the environment variable from DOS. For example:
  177.  
  178.           set username=Peter
  179. >Complete Command-Line Syntax
  180. The complete KP5 command-line syntax is as follows:
  181.  
  182.   ┌───────────────────────────────────────────────────────┐
  183.   │  KP5 [filename [username]] [-B] [-M] [-C] [-S]        │
  184.   │                            [-X] [-V] [-N]             │
  185.   │                            [-R] [-T] [-E]             │
  186.   │                            [-A] [-O]                  │
  187.   │                            [-K:<valid-key-index>][-I] │
  188.   └───────────────────────────────────────────────────────┘
  189.  
  190.   switches:
  191.  
  192.     -B   use default black & white color set for CGA/EGA/VGA
  193.     -M   use default monochrome ('green screen') color set
  194.     -C   use default polychrome color set
  195.     -S   compensate for 'snow' on CGA displays
  196.     -X   export records and quit
  197.     -V   select Verified records (use with the -X switch)
  198.     -N   select New or modified records (use with the -X switch)
  199.     -R   restricted editing (forced entry of entire record)
  200.     -T   total verification mode (records must be 100% verified)
  201.     -L   record session information in the Log file (KP5.LOG)
  202.     -E   entries must be confirmed by pressing the Enter key
  203.     -A   write session statistics in ASCII format instead of dBase
  204.     -O   nO session statistics file will be written
  205.     -K:<valid-key-index>  open a 'valid-key' index file
  206.     -I   display the compile date, version, and registration
  207.  
  208. The -B, -M, and -C switches are used to override the default and
  209. user-designed colors. The colors used by KP5 are stored in a
  210. configuration in the local directory, and so become the default the
  211. next time that KP5 is loaded from that directory.
  212.  
  213. The -X switch is used to export records in 'batch' mode. See "How
  214. to Export" topic for details.
  215.  
  216. The -V and -N switches may be used to select verified and/or new or
  217. modified records for batch export. They have meaning only if the -X
  218. switch is also specified.
  219.  
  220. The -R switch is for sadistic administrators.  It invokes a
  221. 'restricted editing' mode which disables most of the cursor
  222. movement keys, and which requires the user to enter complete
  223. records.  The user may go backwards to correct an error, but cannot
  224. go forward using the arrow or tab keys.
  225.  
  226. The -L switch tells KP5 to maintain a log file. The log file is a
  227. running account of KP sessions, including dates and times each KP
  228. file is opened and closed, as well as selected file statistics
  229. (#records entered, verified, deleted, etc.).  The log file is named
  230. KP5.LOG, and resides in the KP5 program directory.
  231.  
  232. The -A and -O switches determine what type of 'session statistics'
  233. file will be written, if any. The default is dBase-III compatible
  234. (KP5STATS.DBF), but -A specifies ASCII text (KP5STATS.DAT) and -O
  235. suppresses statistics file generation.
  236.  
  237. The -K: switch opens a valid-key index file. This is an ordinary
  238. index file associated with some 'master' KP5 file, and will be used
  239. to validate record keys as they are input. You must provide the DOS
  240. path and file name, eg, -K:C:\KP5\FILES\MASTER.
  241.  
  242. The -I switch results in a display which shows the KP program
  243. version number, the registration number, and the registree's name.
  244.  
  245. The -E switch causes KP5 to require that the user press the Enter
  246. key to confirm each entry, including menu selections. This also
  247. disables the AUTOWRITE feature: the Enter key must be pressed after
  248. a record has been filled in. Normally, KP5 automatically accepts
  249. entries as they are filled out.
  250.  
  251. If you load KP5 with a ? as the only parameter, a screen showing
  252. the command-line switches will be displayed.
  253. >The KP5 Interface
  254. The KP5 interface consists of a single drop-down menu system, a
  255. series of dialog screens, and a record editor.
  256.  
  257. THE MENU SYSTEM
  258.  
  259. KP5 functions are accessed through a system of drop-down menus.
  260. This system is activated when KP5 is started.
  261.  
  262. If the menu bar is not on-screen (for example, during data entry),
  263. you may usually activate it by pressing F10.
  264.  
  265. To move between menus, use the left or right arrow keys, or press
  266. the space bar. To select an option from a menu, either highlight
  267. the choice using the up and down arrow keys and press Enter, or
  268. simply press the highlighted 'hot key' for the option. If KP5 was
  269. started using the -E command-line switch, you will have to press
  270. ENTER after the 'hot key'.
  271.  
  272. Not all menu items are active (selectable) all the time. For
  273. example, if there is no file open, the DATA ENTRY menu has no
  274. meaning and so none of its selections will be active.
  275.  
  276. There are five menus:
  277.  
  278. FILE           Functions that operate on the file or system
  279.                level:quit, open/close, export to ASCII, list,
  280.                printer setup, help.
  281.  
  282. DATA ENTRY     Access to records: enter new records, modify
  283.                existing records, verify, look.
  284.  
  285. RECORD         Operations on the current record: delete, change
  286.                record key, mark, blank, undo.
  287.  
  288. FEATURES       KP5 global features: sound, lock keyboard on error,
  289.                allow entry into protected fields, define the 'fill
  290.                character'.
  291.  
  292. MASK           Edit the five data entry mask elements: picture,
  293.                tabs/attributes, minimum valid, maximum valid,
  294.                minimum missing.
  295.  
  296. UTILITIES      Access to seldom-used but vital functions: pack,
  297.                reindex, restructure, copy, empty, remove exported,
  298.                global flag set, merge, set password, list mask
  299.                structure, colors.
  300.  
  301. Two menu selections have 'really hot' keys assigned to them. When
  302. a 'really hot' key is pressed, the associated function is
  303. activated, no matter what you are doing at the time (eg, the menu
  304. does NOT have to be displayed). The 'really hot' keys and their
  305. functions are as follows:
  306.  
  307. Alt-P     Printer Setup
  308. Alt-F1    Online HELP document (see "how to get HELP")
  309.  
  310. DIALOGS
  311.  
  312. There are a number of 'dialog boxes' or screens that KP5 uses to
  313. get information from you (file names and the like). There are
  314. certain keys that behave consistently during these occasions, and
  315. they are:
  316.  
  317. F1             Context-sensitive HELP (see "How to get HELP").
  318. F2             Finish the dialog and accept input.
  319. Esc            Finish the dialog and cancel.
  320. Enter          Finish field and advance to next field.
  321. Tab            Advance to next field
  322. BackTab        Go to previous field
  323. Ctrl-Backspace Erase (blank) the current field.
  324. F10            Activate the menu.
  325. arrows         Move up or down within the dialog.
  326.  
  327. Normally, the cursor will automatically advance when an item is
  328. completely filled in. This is called the 'autowrite' feature. If
  329. the autowrite feature is disabled, the user must press the Enter
  330. key to confirm each entry. The autowrite feature may be disabled
  331. either through the FEATURES menu, or using the -E command-line
  332. switch. Within dialogs, the usual editing keys are active: Ins,
  333. Del, Backspace, left and right arrows, Home, and End.
  334. >How to get HELP
  335. There are five levels of HELP available. The first is a 'context-
  336. sensitive' system activated by pressing F1. This system tries to
  337. provide help on whatever it is you are doing at the time. If no
  338. specific help is available, it displays general keyboard-usage
  339. information.
  340.  
  341. The second kind of HELP is accessed by selecting HELP DOCUMENT from
  342. the FILE menu, or by pressing Alt-F1: this provides access to the
  343. online help document, which is what you are reading right now. You
  344. may print a single topic, or the entire document, from within this
  345. HELP facility. The file KP5.DOC is generated in this manner.
  346.  
  347. The third HELP level comes in the form of 'item information' boxes
  348. that are displayed whenever you are required to provide information
  349. to KP5. For example, item information boxes guide you through the
  350. process of structuring a data set.
  351.  
  352. The fourth kind of HELP is a listing facility that is loaded by
  353. pressing SHIFT-F1 whenever you are entering a file name, or looking
  354. for an existing record key. It presents a menu from which you may
  355. select. In the case of KP5 files, selected information from the
  356. file headers (label, number of records..) will also be displayed.
  357.  
  358. The final kind of help is me:
  359.  
  360.        ┌───────────────────────────┐
  361.        │  Peter Charpentier        │
  362.        │  47 Meeting House Hill Rd │
  363.        │  Durham, CT 06510         │
  364.        │                           │
  365.        │  CompuServe: 70053,705    │
  366.        └───────────────────────────┘
  367.  
  368. Be sure to indicate which version of KP5 you are using (select
  369. About.. from the FILE menu).
  370. >How to set up a new KP5 file
  371. Select Open from the FILE menu. A dialog box will be displayed,
  372. into which you must enter the DOS directory and KP5 file name. For
  373. example, to create a file named STUDYX in the C:\KP5\FILES
  374. directory, the dialog box will look something like this:
  375.  
  376.        ┌──────────────────────────────────────┐
  377.        │    KP5 File  C:\KP5\FILES\STUDYX___  │
  378.        └──────────────────────────────────────┘
  379.  
  380. If KP5 finds a file with the specified name, it will be opened.
  381. However, if the file name is not found, you will be asked if you
  382. want to create a new file.
  383.  
  384. When you respond with Y to that prompt, the FILE STRUCTURE dialog
  385. will be displayed. Into this screen you must enter:
  386.  
  387.      1) The CARD SIZE
  388.      2) The number of CARDS per RECORD
  389.      3) The position(s) and length(s) of the RECORD KEY(s)
  390.  
  391. This seems a good place to explain the basic elements of the KP5
  392. file structure, so here goes.
  393.  
  394. RECORDS AND CARDS EXPLAINED
  395.  
  396. RECORDS are made up of one or more CARDS. In the old days (10 years
  397. ago), cards were made out of paper and had 80 columns. If your
  398. 'logical record' had more than 80 columns, you had to break it up
  399. into two or more cards, or 'physical records'. KP5 uses this
  400. paradigm, even if it seems a bit dated. Of course, KP5 cards may be
  401. of any reasonable length, and there is no law that says you ever
  402. have to use more than one card per record. However, you may want
  403. to, and here's why:
  404.  
  405. If you have experience in survey research, you know that, during
  406. the pretest period, the data collection instruments tend to change
  407. dramatically. It is usual to place the column specifications on the
  408. data collection form, generally in the right margin next to the
  409. data entry blanks. As the form undergoes revisions, you continually
  410. have to change column specifications, and if you are committed to
  411. just one large card per record, huge blocks of columns may have to
  412. be changed. This gets a little crazy after a while, not to mention
  413. expensive. Also, column specifications like '5385-5387' can be hard
  414. to place in the margin.
  415.  
  416. We have found that a good strategy is to use a moderate card size
  417. of (say) 160 or 240 columns, but leave a blank 'expansion zone' at
  418. the end of each card. For example, if the card size is 240, we
  419. start a new card when the current column gets to around 200. With
  420. this setup, inserting new questions into a form involves reprinting
  421. a few pages, not the entire form. Similarly, the input programs
  422. used to read the records are easier to modify when insertions or
  423. deletions affect cards, not entire records.
  424.  
  425. Another reason to stay away from huge card sizes is that the
  426. software used to read the ASCII files created by KP5 may have some
  427. record length restriction. You will probably never get into
  428. software trouble if you keep the card size below 256.
  429.  
  430. To complete the file structure, you must provide the position and
  431. length of one or more RECORD KEYS. These are explained next.
  432.  
  433. RECORD KEYS
  434.  
  435. A requirement of KP5 files is that each record (NOT each card) must
  436. have a unique record key. KP5 files are always sorted (indexed,
  437. actually) by the record key. The record key is usually a subject ID
  438. code, but sometimes two or more fields must be combined to form a
  439. unique key. For example, in a hospitalizations data set, the unique
  440. key may be hospital unit number plus date of admission.
  441.  
  442. Each record key is defined by 1) position and 2) length. KP5
  443. assumes that all record keys will be located on the first card. If,
  444. for some reason, you have a record key on some other card, you must
  445. add the lengths of the preceding card(s) to its position. For
  446. example, if the card size is 240, and the key is on card 3, column
  447. 11, the key position will be 240+240+11=491.
  448.  
  449. AN EXAMPLE
  450.  
  451. Here is a reasonable facsimile of the file structure dialog screen
  452. for a hypothetical STUDYX. This file has two record keys: a five-
  453. digit subject ID at column 1, and a date (yyyymmdd) at column 23.
  454.  
  455.  ┌─────────────────────────────────────────────────────────────┐
  456.  │                data set label  KP5 file example             │
  457.  │                     card size  240                          │
  458.  │    number of cards per record  8                            │
  459.  │           total record length  1920                         │
  460.  │                                                             │
  461.  │    key(s):  position   length       position   length       │
  462.  │    ─────┬──────────────────────┬─────────────────────       │
  463.  │         │1. 1          5       │ 6.                         │
  464.  │         │2. 23         8       │ 7.                         │
  465.  │       ....                    ....                          │
  466.  └─────────────────────────────────────────────────────────────┘
  467.  The FILE STRUCTURE Dialog Screen
  468.  
  469. (The above screen is squashed -- the real thing allows for up to
  470. ten keys)
  471.  
  472. By the way, if you panic at this stage, press the Esc key.
  473.  
  474. If you don't panic, press F2 when you are finished entering the
  475. record key(s), and the file will be created. A default mask will be
  476. constructed, but you will probably want to fine-tune it a bit (see
  477. "Designing the Mask").
  478.  
  479. The file is now ready for data entry.
  480. >How to open a KP5 file for data entry
  481. One way to open a file is on the command line; see "how to start
  482. KP5" for details. The other way is to select Open from the FILE
  483. menu. When you do this, a dialog box will pop up, into which you
  484. must enter the DOS directory and KP5 file name. For example, if the
  485. file is named STUDYX and is located in a directory named
  486. C:\KP5\FILES, the completed dialog box will resemble the figure
  487. shown below.
  488.  
  489.  ┌────────────────────────────────────┐
  490.  │   KP5 file  C:\KP5\FILES\STUDYX___ │
  491.  └────────────────────────────────────┘
  492.  OPEN FILE Dialog
  493.  
  494. If you like, you may press Shift-F1 to select from a list of all
  495. KP5 files found in the specified directory (eg, enter C:\KP5\FILES,
  496. or some other directory name, then press Shift-F1). You may open
  497. any file on this list by selecting it with the up or down arrow
  498. keys, then pressing Enter.
  499.  
  500. If, after entering the name of a file that SHOULD exist, you get an
  501. "Ok to create new file?.." prompt, respond with N! The reason for
  502. the prompt is that KP5 did NOT locate the file in the specified
  503. directory, and assumes you want to create a new file. If you really
  504. do want to create a new file, see that topic.
  505. >How to enter new records into a KP5 file
  506. There are four steps involved in opening a file and entering new
  507. records into it. These are discussed below.
  508.  
  509. Step 1. OPEN THE FILE
  510.  
  511. Follow the instructions in "how to open a file for data entry".
  512.  
  513. Step 2. SELECT 'ENTER NEW RECORDS' FROM THE DATA ENTRY MENU
  514.  
  515. A RECORD KEY dialog, similar to that shown below, will be
  516. displayed.
  517.  
  518. ┌────────────────────────────────────────────────────────────┐
  519. │ ┌───────record key────────┐    ┌───current record key────┐ │
  520. │ │                         │    │ 00001                   │ │
  521. │ │                         │    │ 19910325                │ │
  522. │ └─────────────────────────┘    └─────────────────────────┘ │
  523. │┌──────────────────────────────────────────────────────────┐│
  524. ││     mode entry                                           ││
  525. ││ shift-f1 browse record keys                              ││
  526. ││      f10 main menu                                       ││
  527. ││    ctrl. retrieve next record                            ││
  528. ││    ctrl. retrieve previous record                        ││
  529. ││  ctrl<─┘ access current record                           ││
  530. ││      Esc return to main menu                             ││
  531. │└──────────────────────────────────────────────────────────┘│
  532. └────────────────────────────────────────────────────────────┘
  533. The RECORD KEY Dialog Screen
  534.  
  535. There are two 'record key' boxes in this screen: the right-hand box
  536. shows the current record's key, and the left-hand box is a data
  537. entry area into which you enter the key for the new record. The
  538. current record key is explained in "How to verify records" topic --
  539. it is not really important when you are creating new records.
  540.  
  541. Step 3. ENTER THE RECORD KEY
  542.  
  543. KP5 will search the file for the record key, and if it is NOT
  544. found, the record will be added to the data set. If the record key
  545. IS found, you will be notified, and asked if you want to MODIFY the
  546. existing record.
  547.  
  548. Step 4. KEY IN THE RECORD
  549.  
  550. Once the record has been added, control will pass to the RECORD
  551. EDITOR. This editor is used for entering, verifying, and modifying
  552. records. The cursor will be placed at the first normal, or
  553. 'unprotected', data entry position. Now what you do is, naturally
  554. enough, key in the record. See the next topic for a description of
  555. how the editor behaves during data entry.
  556. >The Record Editor
  557. The record editor screen looks something like this (the example
  558. shown is a little squashed -- the real thing has 80 columns):
  559.  
  560. ┌───────────────────────────────────────────────────────────────┐
  561. │peter studyx 3 records (0 deleted)      data entry/modification│
  562. │┌───────────────────────────────────────────────────┬─────────┐│
  563. ││ f1 help   f4 wrap√  f6 fill '9' f8 key    f10 menu│■Error   ││
  564. ││<─┘ save  sf4 prot√ sf6 dup      f9 mark           │ Message ││
  565. ││Esc abort af4 lock   f7 current sf9 delete af9 undo│         ││
  566. │└───────────────────────────────────────────────────┴─────────┘│
  567. │1        10        20        30        40        50        60> │
  568. │╞═══╤════╪════╤════╪════╤════╪════╤════╪════╤════╪════╤════╪═╤═│
  569. │00002                 19910105                                 │
  570. │                                                               │
  571. │╞═══╧════╪════╧════╪════╧════╪════╧════╪════╧════╪════╧════╪═╧═│
  572. │────────────────╥──────────┬──────────╥─┬─┬─┬─╥─────┬───┬────┬─│
  573. │0000219910105   ║PETER     │06/01/1991║v│X│M│D║  241│  2│   1│*│
  574. └───────────────────────────────────────────────────────────────┘
  575. The RECORD EDITOR Screen
  576.  
  577. The data entry area is between the 'rulers'.  This is essentially
  578. a window into the record. For records with card sizes exceeding 80
  579. columns, the window will 'slide' through the record as you key in
  580. the record. The data entry area will display up to twelve lines
  581. (cards) at a time.
  582.  
  583. An 'information box' is displayed above the data entry area. The
  584. left portion of this box shows the active function keys. The right
  585. side is a message area, used by the range-checking and verify-
  586. error-condition routines.
  587.  
  588. At the bottom of the screen is a 'status line'. The following items
  589. are displayed in the status line:
  590.  
  591.      - the record key
  592.      - username
  593.      - date created/modified
  594.      - record flags (V-verified X-exported D-deleted M-marked)
  595.      - the absolute record position
  596.      - the card number and column
  597.      - whether the current record position has been verified
  598.        (indicated by a diamond in the extreme lower right corner)
  599.  
  600. THE KEYBOARD DURING DATA ENTRY
  601.  
  602. During data entry, certain keys have special actions. These are
  603. listed in the upper information box, but in abbreviated form. A
  604. more detailed explanation of the special keys is herein provided.
  605.  
  606. F1   Help (shows the data entry specifications for the current
  607.      position).
  608.  
  609. F4   Switches the display mode between 'normal' and 'wrap'. In
  610.      'normal' mode, the data entry window slides to the right or
  611.      left as you enter data. One card always takes up one display
  612.      line in normal mode. In 'wrap' mode, cards are wrapped at the
  613.      screen borders, each card may occupy two or more display
  614.      lines, and the data entry window will not shift right or left.
  615.  
  616. sF4  (Shift-F4) Enables or disarms the 'protect' feature. When
  617.      protect is disarmed, data entry is allowed into protected
  618.      areas.
  619.  
  620. aF4  (Alt-F4) When a range check or verification error condition
  621.      has been raised, pressing Alt-F4 overrides the error condition
  622.      and accepts the entered value. When there is no error
  623.      condition raised, Alt-F4 disarms the keyboard locking feature.
  624.      When the lock feature is disarmed, KP5 will report, but not
  625.      enforce, data entry and verification errors.
  626.  
  627. F6   Pressing this key causes a designated 'fill character' to be
  628.      copied into the current record. Copy proceeds from the current
  629.      position to the next tab stop (or the end of the current card,
  630.      if no tabs are assigned).
  631.  
  632. sF6  (Shift-F6) This key causes whatever was entered into the
  633.      PREVIOUS record (during the current data entry session) to be
  634.      copied into the CURRENT record. The copy proceeds from the
  635.      initial position to the end of the data entry field, as
  636.      defined in the mask. If the cursor is not positioned in a
  637.      multiple-column field, a single character will be copied. Old-
  638.      timers recognize this function as the DUP key.
  639.  
  640. F7   Activates the 'show current' feature. This causes whatever was
  641.      in the current card BEFORE the data entry/verification session
  642.      to be displayed below the data entry window. This feature is
  643.      automatically activated when the verify error condition is
  644.      raised.
  645.  
  646. F8   Allows you to change the record key value.
  647.  
  648. F9   Sets or releases the MARK flag for the current record. This
  649.      may be used to identify problem records during data entry.
  650.      Marked records may be listed and shown to a data manager or
  651.      administrator for review.
  652.  
  653. sF9  (Shift-F9) Sets or releases the DELETE flag for the current
  654.      record. Deleted records must be removed in a separate step,
  655.      using the PACK procedure on the UTILITIES menu.
  656.  
  657. aF9  (Alt-F9) This is the UNDO key: any changes made while in the
  658.      record editor will be 'undone', eg, the record will be
  659.      restored to its pre-edit state.
  660.  
  661. F10  Activates the main menu. Each of the actions carried out by
  662.      the function keys explained in this section may also be
  663.      selected from the RECORD or FEATURES menus. You may also
  664.      select Help from the FILE menu, to check out this document
  665.      while entering data.
  666.  
  667. The following additional keys have special meaning:
  668.  
  669. Enter          Ends data entry and accepts the record.
  670. F2             Acts as an alternate Enter key.
  671. F3             Exit to DOS.
  672. Esc            Cancels data entry.
  673. Tab            Moves cursor to the next tab stop (if any).
  674. Shift-Tab      Moves cursor to the previous tab stop.
  675. Numpad-Plus    Acts as an alternate Tab key.
  676. Numpad-Minus   Acts as an alternate BackTab key.
  677.  
  678. (Numpad-Plus and Numpad-Minus are the '+' and '-' keys on the
  679. numeric keypad)
  680.  
  681. RANGE CHECK ERRORS
  682.  
  683. It is possible to set up the data entry mask so that valid-value
  684. and missing-value ranges are checked during data entry. If the
  685. range check error condition is raised, the keyboard will (normally)
  686. lock up, and a nasty message will be displayed in the information
  687. box. You have two options: 1) if you goofed, retype the field, or
  688. 2) if you need to override the error condition, press Alt-F4. If
  689. the error indicates a coding mistake, and the chucklehead who
  690. filled out the form is not around to resolve it, one thing you
  691. might do is leave the field blank (or set it to a missing value),
  692. MARK the record by pressing F9, then list the marked record(s) at
  693. the end of your data entry session. Put those yellow sticky things
  694. all over the form and place it aside.
  695.  
  696. You may disarm the keyboard-lockup-on-error feature at any time
  697. using the Lock option on the FEATURES menu. When this feature is
  698. disarmed, range check errors are reported in the information box,
  699. but not enforced.
  700.  
  701. When the cursor is located on a field for which an error condition
  702. has been raised, you may press F1 to diagnose the error. A
  703. 'details' box will be displayed, showing the defined valid and
  704. missing value ranges, along with the entered value.
  705.  
  706. >Verifying records
  707. Verifying records is pretty much just like entering new records.
  708. You start a verification session by selecting Verify from the DATA
  709. ENTRY menu. The record key dialog pops up, and you will be expected
  710. to enter the key of an existing record to verify. Since you will be
  711. entering existing keys, the 'Current Key' box now has some
  712. relevance, and so will now be explained.
  713.  
  714. HOW TO SELECT AN EXISTING RECORD KEY
  715.  
  716. The most direct way to select an existing record key for
  717. verification (or modification) is to simply type it. However, you
  718. may also locate and retrieve record keys by 'cruising'. Here's how.
  719.  
  720. There is always a 'current record', and its key is shown in the
  721. right-hand box on the record key dialog screen. You may change the
  722. current record by pressing Ctrl-left arrow (obtain the previous
  723. record) or Ctrl-right arrow (retrieve the next record). You may
  724. access (verify) the current record by pressing Ctrl-Enter.
  725.  
  726. Another way to locate record keys is to press Shift-F1. This will
  727. display the record keys on a menu from which you may make a
  728. selection. The record key browser can select all keys, or a subset
  729. of keys based upon the record flags (exported / verified / marked
  730. / deleted). One obvious use of this screening capability in verify
  731. mode is to browse only unverified records. The browser operates
  732. much faster when you opt for all keys.
  733.  
  734. VERIFICATION ERRORS
  735.  
  736. During verification, the range-checking error handler is replaced
  737. by a verification error handler. This procedure raises the
  738. verification error condition whenever a keystroke does not agree
  739. with what was entered during the first pass. As with range checks,
  740. the keyboard will lock up, and you must either retype the old
  741. keystroke, or press Alt-F4 to accept the new keystroke.
  742.  
  743. Records may be partially or 100% verified. You may partially verify
  744. a record by typing in a portion of the record, then pressing Enter.
  745. The arrow keys (NOT the Tab keys) may be used to skip over areas
  746. that are not to be verified. KP5 keeps track of the verification
  747. status of every character in every record, so it knows if a record
  748. has been fully verified. Whenever the verify flags are printed or
  749. displayed, lower-case 'v's indicate partial verification, while
  750. upper-case 'V's indicate 100% verification. If the -T the command-
  751. line switch was used when KP5 was loaded, 100% verification will be
  752. enforced (see "Complete command-line syntax").
  753. >Modifying records
  754. Modifying records is easy: select Modify from the DATA ENTRY menu,
  755. then enter the key of the record you wish to modify. You may use
  756. the methods described under verification to locate record keys.
  757.  
  758. HOW MODIFYING AFFECTS THE RECORD FLAGS
  759.  
  760. When records are modified, the export flags are set to 'not
  761. exported'. The reason for this is that it is routine for
  762. administrators to regularly export to ASCII only those records
  763. flagged as verified but 'not exported yet'. By setting modified
  764. records to 'not exported', the regular export runs will include not
  765. only new, but modified records as well. The verification flags are
  766. not changed when records are modified, although there is nothing
  767. wrong with re-verifying a drastically modified record, just to be
  768. safe.
  769. >Looking at records
  770. There are times when people, especially administrators, need to
  771. just LOOK at records, without the possibility of (accidentally)
  772. modifying them. For this, select Look from the DATA ENTRY menu.
  773. 'Look' mode is similar to modify mode, except that it is impossible
  774. to actually modify data. An added feature in Look mode is that,
  775. even when the record editor is running, the Ctrl-left and Ctrl-
  776. right keys are active, allowing you to retrieve adjacent records
  777. without exiting to the record key dialog.
  778. >Exporting records to ASCII files
  779. As I have probably mentioned a few dozen times, the idea behind KP5
  780. is to prepare ASCII text files for processing by statistical or
  781. data management software.
  782.  
  783. KP5 files (files with names like *.KPF) are NOT ASCII text files.
  784. They must be 'exported' to ASCII before they can be used. There are
  785. two ways to export records: you may do it interactively, using the
  786. menus, or you may do it in batch mode, by using KP5 command-line
  787. options. Following is a discussion of each of these methods.
  788.  
  789. HOW TO EXPORT USING THE MENUS
  790.  
  791. Select Export from the FILE MENU. The export dialog screen will be
  792. displayed. Into this screen you specify the name of the ASCII file
  793. to be created, as well as any record selection criteria. A
  794. facsimile of the export dialog screen is shown below.
  795.  
  796. ┌──────────────────────────────────────────────────────────┐
  797. │ export (ASCII) file name C:\KP5\FILES\STUDYX.DAT________ │
  798. │                                                          │
  799. │ exported  N     minimum date  __________                 │
  800. │ verified  Y     maximum date  __________                 │
  801. │   marked __                                              │
  802. │                                remove trailing blanks? N │
  803. └──────────────────────────────────────────────────────────┘
  804.    The EXPORT Dialog Screen
  805.  
  806. The information that you enter into the dialog box is as follows.
  807.  
  808.    o The name of the ASCII file to be created.
  809.  
  810.    o Whether to select records based on whether or not they have
  811.      already been exported (Y-select EXPORTED records, N-select
  812.      UNEXPORTED records, blank-ignore the export status).
  813.  
  814.    o Whether to select records based on whether or not they have
  815.      been verified (Y-select 100% VERIFIED records, N-select
  816.      UNVERIFIED records, P-select PARTIALLY or 100% verified
  817.      fields, O-select partially verified records ONLY, blank-ignore
  818.      verification status).
  819.  
  820.    o Whether to select records based upon the MARK flag (Y-select
  821.      MARKED records, etc.).
  822.  
  823.    o Whether to select records based upon the date they were
  824.      created or last modified.
  825.  
  826.    o Whether to remove trailing blanks from the exported ASCII
  827.      records. Depending on the record layout, this may save a
  828.      considerable amount of disk space.
  829.  
  830. In the above example, records that have been verified but not yet
  831. exported will be selected. This is the usual selection criterion
  832. for exported data.
  833.  
  834. Deleted records are NEVER exported.
  835.  
  836. The ASCII file record length will be determined by the CARD SIZE
  837. value of the KP5 file. The number of physical ASCII records
  838. generated per logical record will be the same as the CARDS PER
  839. RECORD value.
  840.  
  841. HOW TO EXPORT RECORDS IN BATCH MODE
  842.  
  843. As explained "The complete command-line syntax", the -X, -N, and -V
  844. command-line switches may be used to generate export ASCII files.
  845. Thus, it is possible to write batch files that export records, then
  846. feed them to other programs that add them to master files, check
  847. for logical consistency errors, etc.
  848.  
  849. In batch mode, the export file name is always <filename>.DAT, where
  850. <filename> is the name of the KP5 file. For example, the command
  851. line:
  852.  
  853.      kp5 c:\kp5\files\studyx peter -x -n -v
  854.  
  855. ..will generate an ASCII file named c:\kp5\files\studyx.dat. That
  856. file will include all the verified records that are new or
  857. modified. WARNING: in batch mode, the target ASCII file will be
  858. replaced if it already exists.
  859. >Listings
  860. KP5 supports a variety of listings, or reports. Before you generate
  861. a report, it is a good idea to make sure the printer is correctly
  862. defined (see "Printer Setup").
  863.  
  864. Select List from the FILE menu. A pop-up menu, providing the report
  865. options, will be displayed. There are three kinds of reports:
  866.  
  867.    o A 'basic' listing that describes the file structure, and shows
  868.      record counts (total, exported, verified, deleted, marked).
  869.  
  870.    o An 'abstract' listing that includes a file structure report
  871.      plus a list of record keys and flags.
  872.  
  873.    o A 'full' listing that includes a file structure report plus a
  874.      listing of records.
  875.  
  876. The abstract and full listings may be restricted to a subset based
  877. upon record flags, user name, and/or date of last access.
  878.  
  879. If you select either abstract or full, the listings dialog screen
  880. will be displayed. The purpose of this dialog is to allow you to
  881. enter a record-selection criterion. A reasonable facsimile of this
  882. screen is shown below.
  883.  
  884. ┌──────────────────────────────────────────────────────────┐
  885. │               Printer type HP LaserJet/DeskJet           │
  886. │                Destination Printer                       │
  887. │           Extended Charset Yes                           │
  888. │──────────────────────────────────────────────────────────│
  889. │ Full      line size (80/132) 80                          │
  890. │                                                          │
  891. │ exported __     minimum date __________                  │
  892. │ verified __     maximum date __________                  │
  893. │   marked __                                              │
  894. │  deleted __             user __________                  │
  895. └──────────────────────────────────────────────────────────┘
  896. The LISTINGS Dialog Screen
  897.  
  898. For full listings, and depending on the printer type and card size,
  899. you may be asked to specify a LINE SIZE. If you enter 132 columns,
  900. a slightly more readable printout will be generated.
  901.  
  902. The remaining items are used for restricting the list to subsets of
  903. records. The criteria are ANDed together. For example, if you enter
  904. PETER for 'user name' and enter N for 'verified', you will obtain
  905. a listing of records entered by PETER that were not verified.
  906. Criteria that are left blank will be ignored. For example, Y for
  907. 'verified' selects verified records, N selects unverified records,
  908. and blank causes verification status to be ignored.
  909.  
  910. If you don't like what you see regarding printer type and printout
  911. destination, press F10, select Printer Setup from the FILE menu,
  912. and change it (or press the 'really hot' key, Alt-P). You will be
  913. returned to the report options dialog screen right where you left
  914. off.
  915. >Printer Setup
  916. The Printer Setup option on the FILE menu allows you to specify 1)
  917. what kind of printer you have, and 2) where the printout should be
  918. directed (eg, to a file or to the printer). The PRINTER SETUP
  919. dialog box is shown below.
  920.  
  921. ┌───────────────────── Printer Setup ─────────────────────┐
  922. │┌───────────────┐                                        │
  923. ││Exit           │                                        │
  924. ││Type of printer│      Printer type  HP LaserJet/DeskJet │
  925. ││Destination    │       Destination  Printer             │
  926. │└───────────────┘  Extended Charset  Yes                 │
  927. └─────────────────────────────────────────────────────────┘
  928. The PRINTER SETUP Dialog
  929.  
  930. The dialog is controlled by the pop-up menu at the left. Press T to
  931. change the printer type, and D to change the printout destination.
  932. Press E to exit and save the definitions. The printer setup
  933. information is saved in the KP5 configuration file.
  934.  
  935. The various printout-generating dialogs in KP5 display the current
  936. printer setup information. This is to give you a chance to change
  937. it, by pressing F10 and activating the menu system, before
  938. printing.
  939. >Designing the Mask
  940. The data entry 'mask' consists of five elements, or records:
  941.  
  942.    o A PICTURE that determines what kind of character (if any) can
  943.      be entered into each position.
  944.  
  945.    o A TABS/ATTRIBUTES element that defines the tab stops, as well
  946.      as a number of special 'attributes' that a record position may
  947.      have.
  948.  
  949.    o A MINIMUM VALID record that contains lower limits for 'valid'
  950.      (non-missing) ranges.
  951.  
  952.    o A MAXIMUM VALID record that contains upper limits for valid
  953.      ranges.
  954.  
  955.    o A MINIMUM MISSING record that contains the lower limits for
  956.      missing value ranges.
  957.  
  958. These elements are edited using the 'mask editor', which is
  959. available from the MASK menu. Modifying a mask element is very much
  960. like entering a data record.
  961.  
  962. It is not necessary to modify any of the mask elements, as KP5 will
  963. cook up a default set for you. However, most users feel the need at
  964. some point. The general usage of the editor is explained in "The
  965. Mask Editor", and details for using the editor for each of the mask
  966. elements are given in separate topics.
  967. >The Mask Editor
  968. The Mask Editor is the means by which the five mask elements may be
  969. modified to fit your record structure.
  970.  
  971. No matter which element is being edited, there are certain keys
  972. that behave similarly. These are explained below.
  973.  
  974. Enter     Pressing Enter causes the current mask definitions to be
  975.           save (on your approval), and exits the mask editor.
  976.  
  977. F2        Same action as the Enter key.
  978.  
  979. Esc       Cancels mask edit.
  980.  
  981. sF3       (Shift-F3) Switches between the five elements,
  982.           maintaining the cursor at its current position.
  983.  
  984. F1        Displays a HELP screen that is specific to the current
  985.           mask element.
  986.  
  987. cF1       (Ctrl-F1) Switches the contents of the 'information box'
  988.           at the top of the mask editor screen.
  989.  
  990. F10       Activates the menu.
  991.  
  992. Details on how to use the Mask Editor for each of the mask elements
  993. are provided in separate topics.
  994. >Mask Editor: The Picture mask element
  995. The PICTURE is probably the most important mask element. It is used
  996. not only to define the kinds of data that may be entered, but also
  997. to determine what areas may be used for data entry.  A picture
  998. editing screen is shown below.
  999.  
  1000. ┌──────────────────────────────────────────────────────────┐
  1001. │┌────────────────────────────────────────────────────────┐│
  1002. ││           @ any character       ! uppercase            ││
  1003. ││ f1 help   9 numeric (0-9)       ^ nonblank character   ││
  1004. ││cf1 more.. # numbers (0-9,blnk)  $ nonblank+uppercase   ││
  1005. │└────────────────────────────────────────────────────────┘│
  1006. │1        10        20        30        40        50      >│
  1007. │╞═══╤════╪════╤════╪════╤════╪════╤════╪════╤════╪════╤═══│
  1008. │99999!@@@@@@@@@@@@@@@@99999999@@@@@@@@@@@@@@              │
  1009. │@@@@@@#############################!@@@@@@@@@@@@@@@@@@@   │
  1010. │╞═══╧════╪════╧════╪════╧════╪════╧════╪════╧════╪════╧═══│
  1011. │Tab Prot vCpy Strt End kyCpy                   1    │1  │1│
  1012. └──────────────────────────────────────────────────────────┘
  1013. The PICTURE Editor
  1014.  
  1015. If you look at the default picture for any KP5 file, you will see
  1016. a record that is filled in with '@'s. The @ tells KP5 to accept ANY
  1017. character into that data entry position. Other so-called 'editing
  1018. characters' have different meanings:
  1019.  
  1020. @    - any character
  1021. 9    - digits (0-9 only)
  1022. #    - numeric characters (0-9, blank, '+', '-', and '.')
  1023. ^    - any non-blank character
  1024. !    - any character; will be converted to uppercase
  1025. $    - any non-blank character; will be converted to uppercase
  1026.  
  1027. These characters are displayed in the 'information box' at the top
  1028. of the PICTURE editing screen.
  1029.  
  1030. Modifying a mask is simply a matter of entering the appropriate
  1031. editing characters into the proper places in the record. If a
  1032. character is entered into the mask that is NOT one of the above
  1033. editing characters, that position will be considered a 'protected
  1034. field'.
  1035.  
  1036. What is a protected field? I hear you ask. Read on:
  1037.  
  1038. PROTECTED FIELDS
  1039.  
  1040. A 'protected' field is a region into which data entry is normally
  1041. prohibited. To illustrate, consider the scenario described in the
  1042. section about setting up new files. Under that scheme, the card
  1043. size was 240 columns, but most cards were blank starting around
  1044. column 200, to allow for 'expansion' within the record. Those blank
  1045. areas should be protected from data entry, at least until the
  1046. expansion takes place. Protected areas are usually blank, but they
  1047. may contain data that is to be 'hard wired' into each record. For
  1048. example, you may want to place a constant 'file code', or 'record
  1049. layout code', somewhere in each record. This code will be the same
  1050. for each record.
  1051.  
  1052. It is possible during data entry to temporarily 'unprotect' a
  1053. protected area.
  1054.  
  1055. Defining protected fields is usually accomplished by typing
  1056. whatever it is that is supposed to be there. For example, use the
  1057. space bar for blank protected fields, type 'A123' if a file code is
  1058. supposed to have that value, etc. The only problem that should
  1059. arise is in the case where a protected field is supposed to contain
  1060. one of the editing characters (say that the file code is 'A009').
  1061. In that case, you will have to manually protect the position(s).
  1062. You do that by pressing Ctrl-F4, which is one of the 'attribute
  1063. function keys' that are shared between the PICTURE editor and the
  1064. TABS/ATTRIBUTES editor (see the discussion of the TABS/ATTRIBUTES
  1065. editor).
  1066.  
  1067. Protected areas appear in the PICTURE editor in reverse video. You
  1068. may also verify that a position is protected by looking at the
  1069. 'attribute status' display at the bottom of the screen. All of the
  1070. possible attributes are displayed in this line, and the attributes
  1071. for the current position are highlighted and in uppercase.
  1072.  
  1073. SPECIAL KEYS FOR THE PICTURE EDITOR ONLY
  1074.  
  1075. The PICTURE editor sports an enhanced set of editing keys, at least
  1076. compared to the data entry record editor. Insert mode and
  1077. destructive deletes are supported, so columns may be shifted left
  1078. or right as you wish. Ctrl-End will blank out (protect) the rest of
  1079. the current card. You may also insert and remove entire cards.
  1080.  
  1081. All of the special keys are explained in a special HELP screen
  1082. available by pressing F1.
  1083.  
  1084. It is important to remember that the PICTURE editor ONLY affects
  1085. the data entry mask, and NOT the actual data. For example,
  1086. inserting a new card in the PICTURE will NOT insert blank cards in
  1087. the actual records. The number of cards in the file structure will
  1088. remain the same (cards below the insertion point will be shifted
  1089. down, and the last card will be removed). If you want to add or
  1090. remove columns or cards in the data set, use the KPI utility
  1091. program that is shipped with KP5.
  1092. >Mask Editor: The Tabs/Attributes mask element
  1093. Each position in a KP5 record may have any of five 'attributes':
  1094. tab, vertical copy, key copy, field start, and field end. In the
  1095. TABS/ATTRIBUTES editor, you set attributes by typing in 'surrogate
  1096. characters' for each of the attributes. These are: t, v, k, n, b,
  1097. [, and ], as shown below in the sample TABS/ATTRIBUTES mask editor
  1098. screen.
  1099.  
  1100. ┌──────────────────────────────────────────────────────────┐
  1101. │┌────────────────────────────────────────────────────────┐│
  1102. ││                            b bypass verify  f1 help    ││
  1103. ││ t set tab v vertical copy  [ field start   cf1 more..  ││
  1104. ││ n numeric k key copy       ] field end                 ││
  1105. │└────────────────────────────────────────────────────────┘│
  1106. │1        10        20        30        40        50      >│
  1107. │╞═══╤════╪════╤════╪════╤════╪════╤════╪════╤════╪════╤═══│
  1108. │kkkkk     [   ]       kkkkkkkkt   bbbbbbbbbbbbbbbbbbbbb   │
  1109. │vvvvvt             t                                      │
  1110. │vvvvvt                                                    │
  1111. │╞═══╧════╪════╧════╪════╧════╪════╧════╪════╧════╪════╧═══│
  1112. │Tab Prot Vcpy Strt End kycpy                   1    │1  │1│
  1113. └──────────────────────────────────────────────────────────┘
  1114. TABS/ATTRIBUTES mask editor
  1115.  
  1116. TABS
  1117.  
  1118. To set a tab stop, enter a 't' in the appropriate position.
  1119.  
  1120. KP5 will beep when the cursor meets a tab stop during data entry,
  1121. so many users set tab as audible cues that indicate to the data
  1122. entry operator where the cursor is. A really good data entry
  1123. operator rarely looks at the screen, so audible cues are most
  1124. helpful.
  1125.  
  1126. Another use for tab stops is in conjunction with the 'fill key'.
  1127. When the operator presses the 'fill key' (F6), a 'fill character'
  1128. is entered into the record, starting with the current position and
  1129. proceeding to the next tab stop. The most common use of the 'fill
  1130. key' is to fill with 'not applicable' codes. For example, if the
  1131. response to the question 'do you smoke?' is NO, the rest of the
  1132. current smoking section should be coded as 'not applicable'. If the
  1133. convention is that 'not applicable' codes consist of strings of
  1134. 9's, then the operator would press F6, then press 9.
  1135.  
  1136. KEY COPY FIELDS
  1137.  
  1138. Key copy (k) fields are normally set by the program. However, you
  1139. may have the record key duplicated anywhere in the record by
  1140. setting the 'k' attribute. Warning: this procedure is not
  1141. recommended for records having multiple keys. The program will
  1142. attempt to duplicate the entire multiple key as it finds enough
  1143. 'k's, which may not be what you want. I recommend that vertical
  1144. copy (next paragraph), NOT key copy, be used wherever possible. Key
  1145. copy fields are super-protected; they cannot be unprotected as can
  1146. normal protected fields. The ONLY way to change record keys is by
  1147. using the 'key name' key (F8) available in the record editor.
  1148.  
  1149. THE VERTICAL COPY ATTRIBUTE
  1150.  
  1151. A position that has the 'vertical copy' (v) attribute will have
  1152. copied into it whatever was entered into the preceding card at the
  1153. same column. In the sample screen, columns 1-5 of cards 2 and 3 are
  1154. set for vertical copy, which means that columns 1-5 of the first
  1155. card will be copied straight down onto the next two cards. This
  1156. happens to be a record key field (subject ID), so the result is
  1157. that the subject ID will be entered into the first 5 columns of
  1158. each card. Vertical copy fields are automatically protected.
  1159.  
  1160. FIELD START and END
  1161.  
  1162. The [ and ] characters are used to define data entry fields that
  1163. have more than one column. When a field has been defined in this
  1164. way, any range checks defined in the remaining mask elements will
  1165. operate on the entire field, not each character individually. If a
  1166. data entry position has neither attribute, it is assumed to be a
  1167. single-column field.
  1168.  
  1169. NUMERIC FIELDS
  1170.  
  1171. Numeric fields are evaluated as numbers during range and
  1172. verification checks (eg, '005.3' and '5.300' are equivalent). In
  1173. addition, entries will be right-justified on input.
  1174.  
  1175. To define a field as numeric, first set its start and end points
  1176. with the [ and ] keys. Next, position the cursor anywhere in the
  1177. field and press the 'n' key.
  1178.  
  1179. See the NUMERIC FIELDS topic for more information.
  1180.  
  1181. BYPASS VERIFY FIELDS
  1182.  
  1183. Bypass verify (b) fields are those for which you will not require
  1184. verification. For example, you may not wish to verify a 'fuzzy'
  1185. field such as one containing a free-text comment. A record will be
  1186. considered 100% verified if all fields except for the bypassed ones
  1187. have been verified.
  1188.  
  1189. MULTIPLE ATTRIBUTES
  1190.  
  1191. It is possible to set multiple attributes in the same position,
  1192. but, obviously, only one attribute character may be displayed. To
  1193. clarify things, the 'attribute status' display in the lower left
  1194. corner of the mask editor shows all of the attributes for the
  1195. current position.
  1196.  
  1197. ATTRIBUTES VIA FUNCTION KEYS
  1198.  
  1199. It is also possible to set (and release) attributes using function
  1200. keys. To see which keys do what, press Ctrl-F1. The information box
  1201. display will change, showing all of the function key assignments.
  1202. For example, Ctrl-F4 may be used to protect a field, and Ctrl-F9
  1203. will define a field as 'numeric'. The function key assignments are
  1204. common to both the PICTURE and TABS/ATTRIBUTES editors, which means
  1205. that you may set attributes from within the PICTURE editor. The
  1206. function key assignments may be displayed from within the PICTURE
  1207. editor, also by pressing Ctrl-F1.
  1208.  
  1209. ┌────────────────────────────────────────────────────────────────┐
  1210. │cf1 more..   cf4 protect    cf7 field start   f4 wrap  f10 menu │
  1211. │cf2 set tab  cf5 vert copy  cf8 field end  sf3 switch  <─┘ save │
  1212. │cf3 unprot   cf6 key copy   cf9 numeric               Esc cancel│
  1213. └────────────────────────────────────────────────────────────────┘
  1214. ATTRIBUTES function keys
  1215. >Mask Editor: The Range-Check mask elements
  1216. The remaining mask elements (MINIMUM VALID, MAXIMUM VALID, MINIMUM
  1217. MISSING) define ranges for validity checks. These mask elements
  1218. work with the FIELD START and FIELD END attributes, set by the
  1219. TABS/ATTRIBUTES editor, to check data as they are input. For a
  1220. given field, any, all, or none of the range values may be defined.
  1221.  
  1222. The range-check mask elements may be used to define data types that
  1223. are not included in the PICTURE editing characters. For example,
  1224. say that two fields are to be defined: a 1-column field containing
  1225. a number in the range 1-3, followed by a three-digit number in the
  1226. range 001-240. The missing value codes for the first field are 7
  1227. (refused), 8 (unknown), and 9 (not applicable). Similarly. the
  1228. missing value codes for the second field are 997, 998, and 999.
  1229. Blanks are prohibited in the first field, but allowed in the
  1230. second. The mask elements might look like this:
  1231.  
  1232. PICTURE             9###
  1233. ATTRIBUTES           [ ]
  1234. MINIMUM VALID       1001
  1235. MAXIMUM VALID       3240
  1236. MINIMUM MISSING     7997
  1237.  
  1238. IMPORTANT NOTE: Unless a field has been defined as numeric, it will
  1239. be treated as a character string for the purpose of range-checking.
  1240. This means that numbers should be right-justified and left-zero-
  1241. filled (eg, '001', not '  1').
  1242.  
  1243. A NOTE CONCERNING RANGE CHECKS
  1244.  
  1245. Even though I have implemented range checks in KP5, you might want
  1246. to think twice about using them. The reason is that range checks
  1247. are generally used to trap CODING mistakes, not DATA ENTRY errors.
  1248. The latter are controlled by double-pass keying (verification). It
  1249. is usually the case that when a coding error is found during data
  1250. entry, it cannot be immediately resolved. The operator must put the
  1251. form aside, and wait until the data manager or some other
  1252. administrator can determine what to do about the error. This
  1253. process can slow down considerably the data entry operation. We
  1254. have found that the place to check for coding mistakes is at the
  1255. point at which the exported ASCII records are input and added to
  1256. the master statistical files. Batches of records with errors are
  1257. thus identified and resolved at some regularly scheduled time.
  1258. >Numeric fields
  1259. It is now possible to define a 'numeric field' in a KP5 mask.
  1260. Values entered into numeric fields will be automatically right-
  1261. justified, or aligned to a decimal point position if one is defined
  1262. in the picture. Range checks will be evaluated numerically (up to
  1263. 19 significant digits) instead of as characters, so you don't have
  1264. to worry about left-zero-fills.
  1265.  
  1266. HOW TO DEFINE A NUMERIC FIELD
  1267.  
  1268. The first step is to define a standard field in the TABS mask
  1269. editor, eg, place a '[' where the field starts and a ']' where it
  1270. ends. Next, while still in the TABS mask editor, position the
  1271. cursor anywhere within the field and press 'n'. The field should
  1272. fill up with n's and the attribute display at the lower left should
  1273. indicate NUM.
  1274.  
  1275. THE PICTURE MASK FOR NUMERIC FIELDS
  1276.  
  1277. You may use any picture-editing characters for numeric fields,
  1278. although usually you would use either '#' or '9'. If you place a
  1279. period ('.') in a numeric field's picture, a 'decimal anchor' will
  1280. be defined at that position. If a decimal anchor is defined, then
  1281. entered values will be aligned around it.
  1282.  
  1283. ENTERING NUMBERS
  1284.  
  1285. If a decimal anchor exists for a numeric field, the entered value
  1286. will be right-justified to the anchor position as soon as:
  1287.  
  1288.    - the '.' key is pressed
  1289.    - the space bar is pressed
  1290.    - the cursor leaves the numeric field via an arrow or tab key
  1291.  
  1292. If there is not a decimal anchor, the entered value will be right-
  1293. justified to the last position as soon as:
  1294.  
  1295.     - the operator presses the space bar
  1296.     - the cursor leaves the numeric field via an arrow or tab key
  1297.  
  1298. Note that a decimal point will be placed in the field only if the
  1299. operator keys it in: a decimal anchor is NOT a protected,
  1300. 'constant' field.
  1301.  
  1302. ENTERING NON-NUMERIC DATA INTO NUMERIC FIELDS
  1303.  
  1304. So-called numeric fields do not have to be numbers. You may define
  1305. a numeric field to accept entry of any datum that you would like
  1306. right-justified, or aligned at a decimal anchor. For example,
  1307. epidemiologists do a lot with the International Classification of
  1308. Diseases (ICD) codes. These codes look like fixed decimal numbers,
  1309. except that trailing blanks are important and many start with an
  1310. alpha character. A KP5 numeric field may be set up to accept ICD
  1311. codes with a picture like this:
  1312.  
  1313.    !!!!.!!!
  1314.  
  1315. When a code like 'E83', '140.9', or '20.0' is entered, followed by
  1316. pressing the space bar, the entry will be correctly aligned and the
  1317. cursor will advance to the next field. The numeric range check will
  1318. be bypassed if the entered value is not numeric.
  1319. >Session statistics files generated by KP5
  1320. A session statistics file consists of records that provide
  1321. summaries of keypunch sessions. A record is generated each time a
  1322. KP5 file is closed. By default, the statistics file generated by
  1323. KP5 is dBase-III compatible and named KP5STATS.DBF. However, the
  1324. file will be ASCII text and named KP5STATS.DAT if the -A command-
  1325. line switch is used, or suppressed entirely if the -O switch is
  1326. used. KP5 attempts to place the statistics file in the program
  1327. directory (usually C:\KP5); if this cannot be done (on a network
  1328. with restricted access to that directory, for example), the file is
  1329. placed in the same directory as the KP5 file that was most recently
  1330. processed.
  1331.  
  1332. The dBase record structure, as well as the layout of the ASCII text
  1333. file, is as follows:
  1334.  
  1335. Field  Field Name  Type       Width
  1336.     1  DATE        Date           8     Date (YYYYMMDD)
  1337.     2  FILE        Character      8     KP5 file name
  1338.     3  USER        Character     10     User name
  1339.     4  TIMEIN_HH   Numeric        2     Time started (hours)
  1340.     5  TIMEIN_MM   Numeric        2     Time started (minutes)
  1341.     6  TIMOUT_HH   Numeric        2     Time finished (hours)
  1342.     7  TIMOUT_MM   Numeric        2     Time finished (minutes)
  1343.     8  ELAPSED     Numeric        6     Elapsed time (minutes)
  1344.     9  KEYSTROKES  Numeric        6     #keystrokes
  1345.    10  RATE        Numeric        6     #keystrokes/hour
  1346.    11  ADDED       Numeric        6     #records added
  1347.    12  VERIFIED    Numeric        6     #records verified
  1348.    13  MODIFIED    Numeric        6     #records modified
  1349.    14  DELETED     Numeric        6     #records deleted
  1350.    15  EXPORTED    Numeric        6     #records exported
  1351.    16  N_RECORDS   Numeric        6     total #records in file
  1352.    17  DIRECTORY   Character     64     KP5 file DOS directory
  1353. >The UTILITIES Menu
  1354. The UTILITIES menu provides access to functions that are not
  1355. necessary for normal processing. These functions are discussed in
  1356. this section.
  1357.  
  1358. COPY FILE
  1359.  
  1360. This procedure is used to make a copy of the KP5 file, optionally
  1361. removing deleted records as it goes. You may also use DOS for the
  1362. same purpose (eg, COPY or XCOPY), but DOS will not fix the file
  1363. header to reflect the new data set name. This is not a big deal,
  1364. since KP5 will do this, on your say-so, when the new file is
  1365. opened.
  1366.  
  1367. The COPY FILE procedure is included for administrators who wish to
  1368. isolate their data entry operators from the DOS command line.
  1369.  
  1370. COPY STRUCTURE
  1371.  
  1372. This procedure makes a copy of the file structure and mask. It is
  1373. used to initialize a new file having the same characteristics as
  1374. the current KP5 file, but no records.
  1375.  
  1376. UPDATE
  1377.  
  1378. This procedure is used to update the current file with records from
  1379. another KP5 file. Normally, records having the same keys in the
  1380. update file will replace records in the current file, although you
  1381. may prevent this.
  1382.  
  1383. EMPTY
  1384.  
  1385. This procedure removes all records from the current KP5 file, but
  1386. keeps the structure and mask intact. Obviously, it is not for the
  1387. faint of heart, and will require you to confirm (twice) that it is
  1388. your intention to zap the file.
  1389.  
  1390. DELETE EXPORTED (*new in 5.06*)
  1391.  
  1392. This procedure will delete all exported records in the current KP5
  1393. file. The PACK procedure (below) must then be run to physically
  1394. remove the deleted records. Make a backup first: you never know
  1395. when one of those supposedly 'finished' records will come back to
  1396. haunt you.
  1397.  
  1398. GLOBAL FLAG SET (*new in 5.06*)
  1399.  
  1400. This procedure allows you to set or release the DELETE, EXPORT,
  1401. and/or MARK flags for ALL records in the current KP5 file. For
  1402. example, you may use it to remove all record marks.
  1403.  
  1404. RESTRUCTURE
  1405.  
  1406. This procedure allows you to make structural changes to the KP5
  1407. file. You may change the card size, number of cards per record, and
  1408. key locations. If the file has records in it, they will be
  1409. truncated or padded with blanks if the card size is adjusted. If
  1410. you increase the number of cards per record, one or more blank
  1411. card(s) will be appended to each record. If the number of cards per
  1412. record is decreased, one or more card(s) will be removed from the
  1413. end of each record. If the key definitions are changed, the file
  1414. will be re-indexed.
  1415.  
  1416. If what you want to do is insert or remove columns or cards from
  1417. the data set, you probably should use the utility program, KPI.EXE,
  1418. which is shipped along with KP5 (see Appendix V). The RESTRUCTURE
  1419. procedure built into KP5 will always operate on data 'in place'.
  1420.  
  1421. MASK STRUCTURE REPORT
  1422.  
  1423. This procedure generates a printout of the mask structures. It may
  1424. be a long printout, since one line is printed for each data entry
  1425. position.
  1426.  
  1427. PACK
  1428.  
  1429. This procedure removes deleted records from the KP5 file. The PACK
  1430. procedure requires free disk space in order to make a temporary
  1431. backup of the data set, but it will check first to make sure enough
  1432. is available.
  1433.  
  1434. INDEX
  1435.  
  1436. Run the INDEX procedure if you think the index has become
  1437. 'trashed'. Normally, KP5 will sense this condition and
  1438. automatically reindex the file, but there may be times when it
  1439. won't. Symptoms of a damaged index are: failure to locate records
  1440. that you know are in the file, or retrieval of the wrong records,
  1441. or catastrophic lockups when retrieval is attempted. Indexes tend
  1442. to get out of whack when KP5 is 'abnormally terminated' (the
  1443. machine locks up or is turned off or rebooted while the program is
  1444. running).
  1445.  
  1446. ASCII IMPORT
  1447.  
  1448. This utility allows you to import data from an ASCII data set into
  1449. the current KP5 file. The structure of the ASCII file must match
  1450. that of the KP5 file, eg, there must be the same number of physical
  1451. records (cards) per logical record.
  1452.  
  1453. KP4 IMPORT
  1454.  
  1455. This procedure is used to convert KP4 files into KP5 files. It is
  1456. not necessary to have a KP5 file open when KP4 IMPORT is run -- a
  1457. new file will be created from the information in the KP4 file and
  1458. mask (KP4 is the prior incarnation of the KP system).
  1459.  
  1460. FILE PASSWORD
  1461.  
  1462. Select this option if you want to add password protection to a KP5
  1463. file, or if you want to change a file's password. The password will
  1464. be required whenever the file is opened, packed, emptied, or
  1465. restructured. WARNING: Do not forget the password! It is stored in
  1466. the file header in encrypted form, and you may not be able to hack
  1467. it out (at least, I HOPE you won't be able to).
  1468.  
  1469. You may remove password protection entering a blank password.
  1470.  
  1471. COLORS
  1472.  
  1473. This procedure is used to modify the colors used by KP5. The color
  1474. set will be saved in a configuration file named KP5.CFG in your
  1475. current directory. If you wind up with crazy colors, and want to
  1476. restore the default set, simply erase the configuration file, or
  1477. use one of the colorset command-line switches (-m, -b, or -c) the
  1478. next time you run KP5.
  1479.  
  1480. VALID KEY INDEX
  1481.  
  1482. This option establishes a 'valid-key' file for the current session.
  1483. The valid-key file is some master KP5 file that contains a complete
  1484. set of record keys. Using a valid-key file ensures that only valid
  1485. record keys will be entered, and is useful when entering records
  1486. for some pre-defined set of respondents.
  1487. >Shelling to DOS
  1488. There may be times when you would like to use DOS while running
  1489. KP5. For example, you might want to create a new KP5 in some
  1490. directory, but you forgot to create the directory first. Or, you
  1491. might want to delete files to free up disk space prior to packing
  1492. or copying a file.
  1493.  
  1494. The process of temporarily exiting to the DOS environment is called
  1495. shelling to DOS, and you may do this by selecting Shell to DOS from
  1496. the FILE menu. As a precaution against accidentally manipulating
  1497. any open files (a sure recipe for disaster), the Shell to DOS
  1498. option is not available whenever a KP5 file is open.
  1499.  
  1500. To return to KP5, type EXIT at the DOS prompt.
  1501.