POSTCODE FOR DOS
AFD Postcode provides a simple way to speed up the entry of address information into any DOS program: e.g. Word Processors, Databases and accounting programs etc.
Type in the postcode you require and the Town, Locality, County, Mailsort Code and most STD codes are provided for you. You can amend these, add a house name and/or street number, then press the [Insert] key to transfer the address to your program. In view of different methods of operating DOS programs, AFD offer several ways of using the rapid addressing techniques. The two principle and popular methods are:
PC-POP Terminate-Stay-Resident (TSR) Address Lookup
This program is loaded BEFORE your application (database, accounts program, word-processor etc). When you wish to look up a postcode or wish to use Street and Town to find an address, a Hot Key is pressed (typically [Alt]+P). This pops-up a box over the top of your program. When you've found the address, press the [Insert] key and it is typed into the program underneath it. By configuring PC-POP, you can have the address data typed just where you require it and with a range of layout options. PC-POP also provides a powerful label and envelope printing facility.
Setting up PC-POP
Once you have completed the installation, set-up is quite easy.
Just add the line of text shown below to your autoexec.bat file before any menus etc, reboot and the postcode program (PC-POP) is ready to go. (You may find it useful to load PC-POP itself straight afterwards - to do this also type the PC-POP line)
SET PC=C:\POSTCODE
C:\POSTCODE\PC-POP /N -
The second line loads PC-POP and makes it available when your computer starts up. The '/N' is an option to make PC-POP load automatically without awaiting confirmation.
There are several command-line parameters to control PC-POP: see Command Line Parameters, below, or type PC-POP /? to see them on screen.
Once loaded, you may invoke the pop-up program: simply hold down the ALT key then press P ([Alt]+P) (or the alternative hot key you have chosen) and type in the required postcode. PC-POP then provides the following data:
- Street
- Locality
- Town
- County (where a county is present)
- STD Code
- Mailsort Code
If a postcode has more than one possible street entry, a small arrow will appear next to the street on screen - press the down arrow to view the next possible street: an up arrow allows you to move back to a previous street entry.
If you do not know the postcode but have a post town and a street name you can search for its postcode by typing the $ sign. This will bring up a search window that will allow for the entry of the street and post town to search for the postcode that you require. You may also enter the locality name to constrain the search to a locality - but you must have a post town as well.
If you are unsure of the correct spelling of either street, locality or town names, place a $ sign at the beginning of either line to perform a phonetic (fuzzy) search. This will then produce a list of possible addresses. Highlight the one you want using the keyboard arrow keys and press [Enter]. To abandon the search, press [Esc]. To try a new search, press N.
Rapid Address
PC-POP can use a special rapid-address format like '1,b11aa' which
will return a fully formatted address of Commercial Street, B1 1AA.
Putting the line "The Red House,b11aa" will place the property
before the street, on the street line separated by a comma.
You can add (or alter) other parts of the address: like the name, first line and street number by pressing the [Enter] key to enter the address panel.
Once the address is as required, the following options are available:
Press
- N to enter a new postcode to lookup
- [Ins] to insert the address into your program (eg Word processor)
- L to print mailing labels for the address
- V to print envelopes for the address
- X to unload PC-POP from memory: only possible if no other program has been loaded into memory since PC-POP was started
- PgDn to clear PC-POP from screen should you have popped it up by accident or to exit editing of an address
- [Esc] to close the PC-POP screen without other action
Finding STD Codes
You can use PC-POP to look up in which geographical area a certain
telephone STD code is located, as well as using it to find postal
addresses from the Postcode. Press the "/" key and enter
the STD code you require.
If you enter an old-type STD code, the new type will be shown, then the program will find the postal areas using that STD code.
Note: In some areas, especially in larger cities, it is impossible to predict STD codes from postcode data with total accuracy: they are not limited to the same geographical areas and in some cases an area may have several possible STD codes. The information provided by postcode should therefore be treated as an aid to data entry only.
Command Line Parameters
The following command lines will help you control PC-POP. To use them,
type them after PC-POP eg:
PC-POP /? [Enter]
would cause PC-POP to display its command line options.
Parameters Available:
- /? Show command line parameters
- /I:inifile use INIFILE.INI initialization file (default=USERNAME.INI)
- /N become memory-resident without awaiting keystroke confirmation
- /K:nn Max No of characters to pass to keyboard buffer (default=no limit)
Configuration of PC-POP
PLEASE NOTE:- Using this configuration program while PC-POP is loaded will not alter the way the current program operates. To ensure that the new configuration you key in is used, unload PC-POP from memory and then run this utility.
PC-POP can be configured to deal with your address and printer control information: you can even have different PC-POP files for different purposes and you can change the Hot Key (normally [Alt]+P) used to activate PC-POP to another letter.
To configure PC-POP, simply type PCPOPCF myfile [Enter] at the C:\POSTCODE> prompt, where "myfile" is the name of the .INI file you wish to alter.
You will see a screen that provides 5 selections. At the top right of this screen will be the .INI file you will be altering.
A - Set Address Parameters
This will take you into the section that will configure PC-POP to place the data into your application in the manner you want. You can move around this screen using the arrow keys. Once you have finished, press Page Down to exit the screen.Title Field
This allows you to alter the name of the field, this does not appear when the address is transferred.Max Len
This allows you to alter the maximum number of characters that will be transferred to your application.Option
This forces, or not, the transferred field into upper case:
0 - Normal
1 - Force Upper CaseIn the case of the County field, it will allow you to choose the type of county information you require:
0 - Postal counties - does not provide counties for large or county towns
1 - Optional counties - provides county names for all except large cities
2 - Abbreviated Postal counties - uses standard abbreviations to shorten postal counties
3 - Abbreviated Optional counties - uses standard abbreviations to shorten optional countiesDelimiter
This enables you to use DOS ASCII codes to replace the keystrokes that you would normally use to exit the field that has just been completed and move to the next data input field of your database etc. Some examples are :-
\008 Backspace
\009 Horizontal Tab
\011 Vertical Tab
\013 Carriage return [Enter]
\027 Esc (Escape)
\044 , (comma)
Consult your DOS manual for more. It will even allow you to have plain text added.Line
This will set the Line Number order in which the data is transferred. A zero will compress the line, use this when transferring into a word processor when there is no locality field available. Entering '-1' will ignore the line completely when transferring data. Defaults are:
| Name | 30 | 0 | \013 | 1 | ||
| Street | 35 | 0 | \013 | 2 | ||
| Locality | 30 | 0 | \013 | 3 | ||
| Town | 30 | 0 | \013 | 4 | ||
| County | 15 | 0 | \013 | 5 | ||
| Postcode | 10 | 1 | \013 | 6 | ||
| STDCode | 10 | 1 | \013 | -1 | ||
| Mailcode | 5 | 1 | \013 | -1 |
C - Set Colours
Use this section to change the colour of PC-POP. You will see the changes
happening as you alter the relevant colour code numbers but be WARNED,
changing the colours can cause PC-POP to appear invisible after it
is popped up over an application which has the same colour. Page
Down, again exits this screen once you are finished.
H - Set Hot Key
This sets the Hot Key that you will use in conjunction with the Alt
key to pop up PC-POP.
You can also set which (if any) 'Shift Key' should be pressed with your chosen key. You may choose from None (0), A - Alt, C - Ctrl, L - Left Shift or R - Right Shift. The default 'shift' key is Alt.
The default key is [Alt]+P
P - Set Printers
This configures PC-POP to use your printer which allows you to use
the label and envelope printing features of PC-POP. You can configure
PC-POP to use two printers. A label printer and an envelope printer.
Device
This specifies the DOS device or DOS file name to send the data to:
e.g. LPT1 for Printer 1 or c:\Myfile.prn to send the text to a file
called Myfile.prn on your C drive.
Initialise
Allows you to set up printer initialisation codes (like reset, margins
etc). These can usually be found in the reference section of your
printer manual.
Set Top
Printer commands to send before each label or envelope - like line
feeds etc.
Set Left
Printer commands to send before each line of text - like spaces.
Below Text
The number of lines to leave below the last line of the address before
starting the first footer line.
Footer 1
The text and/or printer codes to print as footer line 1.
Footer 2
The text and/or printer codes to print as footer line 2.
Base
Commands to send after each envelope or label (eg page feed)
A sample .INI file is provided for EPSON (PC-POP.EP) and HP (PC-POP.HP) type printers To use one of these, simply rename it to PC-POP.INI.
R Register Postcode for DOS
Use this option to Register your copy of Postcode. This can be done
via the AFD Web Site (if you have internet access) or by calling
our Automatic Freephone Registration Service on 0800 083 8424.
This process activates your copy of Postcode for the remaining period
of your license.
Users with both Windows and DOS versions of Postcode should use the windows 'Welcome' program instead.
INSTRUCTIONS - PC-DOS Command-Line Address Lookup
PC-DOS is a powerful and versatile rapid address program, which can actually write programs for your application, in order to pass data to them. It can be used in a very wide range of database and programming systems, including Alpha 4, Basic, Clipper, dBase, FoxPro, Paradox and most programming languages.
PC-DOS can look up postcodes, or use Street and Town to find an address and a range of parameters allow you to tune calls to the program exactly as you require them.
PC-DOS shares its Street/Town lookup facilities with PC-POP, so instructions for common features are not repeated here.
PC-DOS operates as a command-line driven program. Parameters allows you to pass a request to PC-DOS and tell it the format and location of the answer. PC-DOS places the results of its request in a text or program file - which is either opened and read by the application calling it, or run as a program by the calling application.
Examples are provided showing how to use these techniques from Alpha 4, from dBase/Fox/Clipper etc and from Paradox.
Parameters
/? Show command line parameters /C:nnnn Convert 'nnnn' STD Code to Phoneday Code /F:filename Place data in FILENAME (default = AFD-PC.TXT)
Allows you to give a path and filename for the result of your address look-up/I:inifile Use INIFILE.INI initialisation file (default = USERNAME.INI) This allows you to choose which INIFILE contains the colour settings you wish to use - see configuring PC-POP above. /M:BW Set for Mono (B&W) monitor
PC-DOS defaults to EGA/VGA mode - use this parameter if you have a monochrome display./P:(AA12 3BB) Lookup postcode AA12 3BB and place result in FILENAME file /S:nnnn Convert 'nnnn' STD Code to Phoneday Code & look up location /T:x Result file type where: A=Alpha 4
D=dBase / Fox / Clipper etc
P=Paradox
T=Dos Text FileThis parameter allows you to control the format of the result file - If A, D or P types are specified, the file can be used as a PROGRAM from the respective application.
Examples
dBase / Fox / Clipper
This program fragment packs the postcode from a variable or field called 'pcode' and specifies Type D file in C:\Postcode\AFD-PC for a Monochrome screen.
- Assemble a memory variable with the PC-DOS Parameters
FindAddress = "/P:(" + Pcode + ") /T:D /F:C:\postcode\AFD-PC /M:BW"
- Call the PC-DOS routine from AFD
! C:\postcode\PC-DOS &FindAddress
- Make sure that the new copy of AFD-PC is used
Clear Program AFD-PC
- Run the resulting program created by PC-DOS
DO C:\postcode\AFD-PCParadox
This is a similar routine as a script for Paradox (type P). The FindAddres line should be all on one line.
; Make up parameters for AFD Postcode
FindAddress = "C:\postcode\PC-DOS /P:(" + Pcode + ") /T:P /M:BW /F:C:\postcode\AFD-PC"; Call the PC-DOS routine from AFD
Run NOREFRESH FindAddress; Run the resulting Script created by PC-DOS
Play "C:\postcode\AFD-PC"
Fully commented versions of these examples are provided in the DOS examples of your Postcode installation.
| Postcode | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
![]() |
| Manual Contents | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
![]() |
| Appendix | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
![]() |