Monthly Archives: October 2011

Emailing Report and/or Delimited Files from CODIS

Files can be emailed directly from CODIS to an external email address.  The files can be report files or delimited files (csv, pipe, tab, etc.).  When you run a report program on CODIS a printable report file and often a delimited file are created. When you want to email the file (printable or delimited) to an external email address use the “print” option from any “Select Function” prompt.  For example, when you run a sales analysis you can optionally create a delimited file.  You may want to email one or both of these files to an external email address.

At a “Select Function” prompt, type PRINT <enter>.

At the “Filename >” prompt, type the name of the file you want to email then press the <enter> key.  In the example, we are emailing the SA1000.01, printable sales analysis report.

At the “Printer (or Me, ) >”prompt, type EMAIL/LA and press the <enter> key.  We’re adding the “/LA” to EMAIL because the report is a 132 character wide report and /LA causes the report to be emailed in landscape format.

At the “Email :” prompt, type the external email address you want to send the file to along with a “/P” to cause the file to be converted to a PDF attachment.

Complete each of the “Attn:’ and “Subject :” portions of the email.

CODIS will process the request and place the appropriate file in the CODISMAIL directory.  The email will usually be delivered to the recipient within a few minutes.

Emailing a csv (comma separated value) file is done in a similar way.  At the “Filename >” prompt, type the name of the file you want to email then press the <enter> key.  In this example, we are emailing the SA1000_01.CSV, version of sales analysis report.

At the “Printer (or Me, ) >”prompt, type EMAIL and press the <enter> key.  A “/LA” is not needed this time because the file is csv (delimited – comma separate value) and will not be printed.  Delimited files are usually imported into an external application like Microsoft Excel, Access, SQL, etc.

At the “Email :” prompt, type the external email address you want to send the file to along with a “/C” to cause the file to be sent as a csv attachment.

Complete each of the “Attn:’ and “Subject :” portions of the email.

CODIS will process the request and place the appropriate file in the CODISMAIL directory.  The email will usually be delivered to the recipient within a few minutes.

PO Masking

If your customer requires a PO number on each of their orders and the PO numbers must meet specific constraints (number of characters, PO length, etc.) then you can use CODIS PO masking to insure proper PO number entry during order entry. To force CODIS to prompt for a PO during order entry the customer must be set as such in the Customer Maintenance program, screen #5, line #15.

The accepted validation values you can use in screen #5, line #15 are indicated in the following screen shot.

Add a ‘GS’ (general string) codes record defining the PO mask.  The ‘GS’ codes record should look like the sample in the screen shot.  You can define up to 48 different PO masking schemes (POMASK_1 to POMASK_48).  The example in the screen shot follows the PO masking scheme described in “Example #1” found after the screen shot.

The rules for PO masking in the ‘GS’ codes record are as follows:
1st character is Length qualifier
= – exact length
(entered po# must be the same length as mask)
< – minimum length
(entered po# can be longer than mask, no
validation is done on characters that are
beyond the mask)
~ – any length
(entered po# can be any length, validation
is only done on characters that are
as long as the mask)

2nd character and beyond is the validation mask
? – alpha-numeric
# – numeric
& – alpha
% – any printable character
Any other character must be an EXACT match

Example#1 – “=8###-&???%” means:
the po must match the EXACT length of 10
chr=1 must be an ‘8’
chrs=2,3,4 must be numeric
chr=5 must be ‘-‘
chr=6 must be alpha
chrs=7,8,9 must be alpha-numeric
chr=10 can be any printable character
“8123-AZ12$” would be a valid po#

Example#2 – “<?????” means:
the po must be a minimum of 5 characters long
chr=1-5 must be alpha-numeric
chr=6+ can be any printable character
“8123A-Z12$” would be a valid po#

Example#3 – “~###” means:
the po must be supplied, but can be any length
chr=1-3 (if supplied) must be alpha-numeric
chr=4+ can be any printable character
“81” would be a valid po#

If you were setting a customer to use the PO mask defined in the ‘GS’ codes record above (POMASK_1) then you would place a K1 or KE1 on screen #5, line #15 for the customer in the Customer File Maintenance program.  K1 would validate the PO entered using the PO mask defined in the ‘GS’ codes record at the beginning of the order.  KE1 would validate the PO entered at the end of the order.