This API returns various values from the Shared Memory Area. For example:
This returns the user’s preferred Editor in Screen-Alpha-Field.
The following values can be obtained with this API:
This API call will set the left text area of the status bar to a Screen-Literal value. For example:
This will result in “Hello” being displayed on the left side of the status bar. To clear it, repeat the example above and move spaces to the screen-literal. Since this API only works for Elliott, you should check for the OS type in your program and only do so if you are running under the MS-WINDOWS-OS.
The DI API allows for operation of selected serial port
devices. As devices are added, this
interface will be expanded. Currently,
we support the following device with this API call:
Symbol CS 2000 Consumer Scanner
Screen Parameters | Comment |
DI,dd,ff,pp
| dd = device number: 01 = CS 2000 from Symbol Technologies ff = function number; different for each device pp=port number: 01 = COM1 02 = COM2 03 = COM3 04 = COM4 All functions return ‘N’ in SCREEN-ANSWER if there is a failure, with a negative return code in SCREEN-NUMERIC-FIELD, and an error message in SCREEN-LITERAL |
Functions for CS 2000: | 01 = Initialize the port and return number of barcodes in reader in SCREEN-NUMERIC-FIELD. 02 = Return barcode data in SCREEN-AREA for the barcode number identified in SCREEN-NUMERIC-FIELD. The first byte is a barcode type identifier. 03 = Clear memory in the barcode reader. 04 = Restore the Com port. 05 = Power down the barcode reader. |
Sample Code for Symbol CS 2000 Consumer Scanner Interface:
This is a sample program that will read
content on Symbol Consumer Scanner CS 2000. Run This program by SET MSPL=FIX
*Read Individual Barcode.
Perform varying
Screen-Numeric-Field from 1 by 1
until Screen-Numeric-Field > Bc-Cnt
or
Screen-answer = 'N'
Move 02 To Screen-Column
Perform Screen-Routine
Display Screen-Literal
End-Perform
*Delete Scanner Memory
* Restore the COMM port so other
application can use the COMM port
DM: Display Message
This API has been expanded to provide for longer messages.
This is a set of API calls introduced after Elliott 6.X.060. Use them collectively. They will send out e-mails through the MAPI interface. Developers who use these API calls do not need to know how MAPI works. The following are the options that you can use with these API calls:
Screen-Parameters | Required/ Optional | Comment |
EM,BG,nn,x | Required | Begin E-mail Process
|
EM,RR | Optional | Return Receipt Requested (7.4E only) · Screen-Answer = “Y” = Request a return receipt.
|
EM,CA | Optional | Clear Address (7.4E only) Clear any address sent so far. This is automatically done when a ‘BG’ call is made. |
EM,MA | Optional | Maximum Number of Addresses (7.4E only) · The default is 100 if this API is not sent
|
EM,TO | Required | To Address or Name · Screen-Literal = Recipient Name or Address · Menu-Control = Address ID returned from GA or RN call · Screen-Numeric-Field = Length of Address ID
|
EM,CC | Optional | Carbon Copy (CC) Address or Name · Screen-Literal = CC Recipient Name or Address · Menu-Control = Address ID returned from GA or RN call · Screen-Numeric-Field = Length of Address ID
|
EM,BC | Optional | Blind Carbon Copy(BCC) Address or Name · Screen-Literal = BCC Recipient Name or Address · Menu-Control = Address ID returned from GA or RN call · Screen-Numeric-Field = Length of Address ID · You execute this API call multiple times. It is subject to the maximum e-mail addresses allowed. |
EM,RN | Optional | Resolve Name. It is used to resolve a possibly ambiguous name (7.4E only)
Screen-Literal = recipient name Screen-Numeric-Field = optional window handle of calling program · Output Screen-Literal = resolved name Menu-Control = Address ID from AddressBook Screen-Numeric-Field = Length of Address ID
Note: This function will be removed in v7.7.
|
EM,AD | Optional | Show Address Book (7.4E only) · The API call the address book facility to change the address
Screen-Literal = Optional caption for the address dialog.
Screen-Numeric-Field = Total number of addresses · After this API, use the EM,GA API repeatedly until you have processed all the addresses the user selected. |
EM,GA | Optional | Get Address (7.4E only) · This API gets the next address returned from the address book facility.
Screen-Answer = “Y” means an addressee was returned. “N” means no addressee returned. Screen-Literal = Addressee name Screen-Alpha-Field = ‘FR’ means a “From” name returned. ‘TO’ means a “To” name returned. “CC” means a “CC” name returned. “BC” means a “BCC” name returned. Menu-Control = Address ID from AddressBook Screen-Numeric-Field = Length of Address ID
|
EM,SB | Optional | Subject · Screen-Literal = Subject |
EM,AT | Optional | Attached File · Screen-Area = Complete Path and File Name **Note that the path is required and the attached file must exist. · Screen-Function-Values = Visible filename (opt) If this area is used, the name of the file which will be visible to the recipient will be the value here followed by .TXT.
|
EM,TX | Optional | Text Content of the Body of The E-mail · Screen-Area = Text Line
|
EM,AB | Optional | Abort the E-mail
· The message and all its characteristics are ignored. · Use only after a successful “EM,BG.” You do not need to use this API if “EM,BG” was not executed successfully. |
EM,SE | Required | Send E-mail Message · Returns ‘Y’ in Screen-Answer if the message was successful. Receiving ‘Y’ does not guarantee the e-mail is sent. It simply indicates that MAPI has accepted the e-mail, (i.e. e-mails may not sent because MAPI may not be able to connect to the e-mail transport server). o Screen-Numeric-Field will contain 0 if the message was sent; 1 if the message was cancelled by the user.
|
EM,EX | Required | Exit E-Mail and Disconnect from E-mail Services · This does a logoff from the mail system. · This is automatically called by ElliottSCRN at shutdown.
|
Example:
MOVE
“EM,BG” TO SCREEN-PARAMETERS.
PERFORM
SCREEN-ROUTINE.
IF
SCREEN-ANSWER = “N”
PERFORM NO-MAPI-SUPPORT-MSG
EXIT PARAGRAPH
END-IF.
MOVE
“EM,TO” TO SCREEN-PARAMETERS.
MOVE “sales@netcellent.com” TO
SCREEN-ALPHA-FIELD.
PERFORM
SCREEN-ROUTINE.
MOVE
“EM,SB” TO SCREEN-PARAMETERS.
MOVE “Sales
Promotion” TO SCREEN-LITERAL.
PERFORM
SCREEN-ROUTINE.
MOVE
“EM,TX” TO SCREEN-PARAMETERS.
MOVE “Dear Business
Partner:” TO SCREEN-AREA.
PERFORM
SCREEN-ROUTINE.
MOVE
“EM,TX” TO SCREEN-PARAMETERS.
MOVE “There’s a
sales promotion going on at NETcellent.”
TO SCREEN-AREA.
PERFORM
SCREEN-ROUTINE.
MOVE
“EM,SE” TO SCREEN-PARAMETERS.
PERFORM
SCREEN-ROUTINE.
IF
SCREEN-ANSWER = “Y”
PERFORM MESSAGE-SENT
ELSE
PERFORM MESSAGE-NOT-SENT
END-IF.
If you need more examples of source code, please contact
NETcellent. “EL800MAIL.CBL” can be provided to NETcellent’s developers with
more detail to show you how to construct your own e-mail program.
Any invalid e-mail API calls will result in a message box on the screen and ‘N’ in the SCREEN-ANSWER field. However, the process will continue. For example, specifying too many recipients will result in a message box display, but the message may still be sent with the EM,SE call.
Depending on your situation, it might by desirable for you to write your code to check if SCREEN-ANWSER is equal to ‘N’ to determine if the situation needs special handling by the code.
It is possible to manipulate the values of an e-mail message during the process of sending print lines to the output file, assuming that the output is destined for an e-mail message.
To change an e-mail value, do the following:
· Add the following COPY statements to your program:
Copy SetEmail.WS.
Copy SetEmail.PL.
· MOVE a value type as follows TO DETAIL-LINE:
TO | A primary recipient |
CC | A carbon copy recipient |
BC | A blind carbon copy recipient |
SB | The subject line |
TX | A line of text in the message body |
· MOVE the value itself TO DETAIL-LINE(4:)
· PERFORM SET-EMAIL-OPTION
Notes
1. You may specify as many TO, CC, and BC values as you wish.
2. The presence of any TO, CC or BC value means that all the original recipients will be replaced by the new recipient(s).
3. You may specify as many TX values as you wish. Each value will be followed by a CR/LF.
4. The presence of any TX value means that all the original text in the message body will be replaced by the new text.
5. The SET-EMAIL-OPTION paragraph will MOVE SPACES TO DETAIL-LINE after calling PRINT30 or PRINT240.
6. If the user specifies output should go to the printer or to disk, these COBOL statements will be ignored.
This API encodes a string in one of two ways:
CO,30
Return the default contact information for the contact identified in\n PASSING-NOTE-FILE-NAME and PASSING-NOTE-FILE-REF-NUMBER.
Upon return, SCREEN-ALPHA-FIELD will contain the e-mail address,\n SCREEN-LITERAL will contain the name, and SCREEN-NUMERIC-FIELD will contain\n the contact-ID. If no contact is\n found, these fields will contain SPACES or ZEROES as appropriate.
CO,99
Delete all contacts from the target.
Default links are established by the TB\ncalls. The LK APIs provide\nadditional links functionality.
\n LK,00 \n | \n Launch the Link whose type is in SCREEN-ALPHA-FIELD. \n |
\n LK,01 \n | \n Add a temporary link. \n SCREEN-ALPHA-FIELD contains the type. SCREEN-MENU Contains the\n Template which may or may not contain variables of the format @@VARn@@. \n |
\n LK,02,nn \n | \n Modify the temporary link (previous LK,01 call). SCREEN-ALPHA-FIELD contains the type. nn = the variable number to replace. SCREEN-LITERAL contains the value for the\n specified variable. \n |
\n LK,91 \n | \n Add a permanent link; otherwise, just like LK,01. \n |
\n LK,92,nn \n | \n Add a permanent link; otherwise, just like LK,02,nn. \n |
\n LK,99 \n | \n Remove a permanent link created by LK,91 and LK,92. SCREEN-ALPHA-FIELD contains the type. \n |
The TK APIs will provide shipping tracking\ninformation.
\n TK,01 \n | \n Passing a length in SCREEN-NUMERIC-FIELD, the system will return the\n possible Shippers (up to 8) in SCREEN-AREA (20 bytes each) and set the\n SCREEN-ANSWER TO “Y” or “N” based on if a valid shipper was found with the\n length. The number of shippers found is stored in SCREEN-NUMERIC-FIELD. If the actual number o |