CM040

Select Customer

Last Revised: 02/27/09

This program should be called whenever it is necessary to select a single customer.

Additional description.

CALL "CM040", Y$, CM040$, CM01$ {, ADDR$[ALL], CM03$ }

CM040 Arguments
Field Passed To/From Description
Y$ To Session Control Variable
CM040.COL To Column number for data entry
CM040.ROW To Row number for data entry
CM040.NAMECOL To Column number where customer name will be displayed.  Leave NAMECOL and NAMEROW zero to disable display of customer name.
CM040.NAMEROW To Row number where name will be displayed.
CM040.DISPADDR$ To
blank Do not display customer address
B Display address below name formatted as it would print on an envelope, i.e., with address line 2 omitted if empty, and City, State, and Zip on the same line.
F Display address below name formatted with separate lines for address line 1, line 2, city, state, and zip.
CM040.ALLOWCTL4$ To Pass as Y or + to allow operator to touch F4 and not select a customer.  Calling program can check if CTL=4.
CM040.CRMODE$ To
blank Customer entry is required
Y Customer entry is not required.
A Prompt should include: Enter or SpaceBar = All
U Prompt should include: Enter or SpaceBar = Next unused#.  Used to determine the next available customer#.
CM040.NOFMODE$ To
blank Customer must exist on customer file
N operator may enter a customer# that is not on the customer file.  This is required for applications that create new customer records.
CM040.USMAIL$ To Passed to DIS481 which will capitalize the address if passed as Y.  The US Post Office prefers addresses be all capital letters.
CM040.EXTRACT$ To If passed as Y then CM040 will extract the customer record, preventing others from extracting it while changes are being made.
CM040.CLEARVDT$ To Pass as Y to cause the display area where the name and address fields are shown to be cleared prior to any operator entry.
CM040.ARROWS$ To
blank No arrow options displayed
U Prompt includes 'ArrowUp=prev screen'
D Prompt includes 'ArrowDn=next screen'
B Prompt includes both ArrowUp and ArrowDn prompts

Calling application can test if CTL=2 then operator touched ArrowUp, CTL=3 for ArrowDn.

CM040.PWIN$ To Pass as P to enable separate prompt window for all entries.  This is required when there is information at the bottom of the screen that must be retained, or when the entry takes place inside a window and it is desired to display the prompt at the bottom of the physical display, and not the active window.
CM040.DISP$ To Pass as Q to have CM040 read the customer record and display the customer number, and optionally the name and address with no operator entries.  The customer# is passed to CM040 in the CM01$ field.  It does not need to be templated.
CM01$ To/From The calling application does not need to obtain the CM01$ template prior to calling CM040.  To pass a default customer#, you can pass a templated CM01$ or a non-templated 6 character CM01$ as the default customer#.  CM01$ will be returned as the templated customer record.
ADDR$[ALL] From Optional.  The address returned from DIS481 formatted for printing.
CM03$ From Optional.  The customer contact record when the customer was selected using a contact name or contact telephone number.