BASIC DIMension statement

The BASIC DIM statement allows you to create a one or two dimension matrix. It is an executable statement with a high overhead. I have found programmers using the DIM statement in a loop. This is a poor use of the DIM statement and incurs a high overhead due to deleting and creating the matrix over and over. It is best practice to create the matrix once using the maximum size needed.

Short Python program to convert a .txt to a PDF

Older multivalue application still print using a page format of either 132 chars by 66 lines or 80 chars by 60 lines. It would be nice if they could be converted to a PDF format for distribution. This is a simple Python script that can convert a .txt file to a PDF using a Python command line. The command line can be executed from a BASIC program. The landscape mode works only on 132×66 and the portrait mode only works with 80×60.

Usage: [land|port] inputpath.txt outputpath.pdf

Required: Needs the fpdf package. pip import fpdf

import sys
from fpdf import FPDF

orient = sys.argv[1]
infile = sys.argv[2]
outfile = sys.argv[3]

if orient == “land”:
    pdf = FPDF(‘L’, ‘in’, ‘Letter’)
    font_height = 0.12
    pdf = FPDF(‘P’, ‘in’, ‘Letter’)
    font_height = 0.16

pdf.set_margins(0.25, 0.25)
pdf.set_auto_page_break(True, margin = 0.25)
if orient == ‘land’:
    pdf.set_font(‘Courier’, ”, 8)
    pdf.set_font(‘Courier’, ”, 10)
pdf.set_xy(0.25, 0.25)

f = open(infile)
for line in f:
    pdf.write(font_height, line)
pdf.output(outfile, ‘F’)


The Power of ERP Integrations

Integrations are vital to an ERP’s usefulness for a business. The whole purpose of an ERP is to connect systems together so your business data is easily accessible.

This process should be cohesive and seamless. Unfortunately, integrations are usually not seamless at all—they can be “clunky” or even inaccurate, which could cause harmful business mistakes.

When another application is integrated with an ERP, its data should be updated in real-time or at least automatically and frequently. It’s not productive or efficient to do the “export, save, import” drill we’re all too familiar with.

Integrations are difficult due to the wide variety of applications and tech stacks in use, even in the same company. However, that challenge doesn’t make them any less necessary or important.

ERP Integration Use Cases

Let’s consider a few examples of ERP integrations.

Your ERP manages most of your financial data, but you have a separate application for sourcing. Your ERP and sourcing application should be integrated so your business financial data is always accurate and current—and so no one wastes their time doing “double entry,” which also introduces the possibility for mistakes. This integration would result in seamless accounts payable and financial reports.

Consider the same ERP with financial data, which your business also uses for payroll. Many businesses have separate time tracking applications. These applications should integrate with your ERP to make payroll a quick, nearly automated process (and again, avoid errors).

Can Your ERP Integrate?

Ashwood’s ForeMost has integrated with numerous technologies, including (but not limited to): ADP, Paycor, FedEx, USPS, UPS, SAGE, QuickBooks, and ACH. Imagine the time your business could save by integrating these systems and processes together. We’ve even worked with PCI compliant third-party systems (leveraging Python database connectors to do so).

Want to learn more? Check us out at the 2019 International Spectrum Conference in Phoenix on April 8-11 at the Wigwam. Also feel free to reach out by email—we’d love to discuss your business needs with you.

Short Python code to create an excel file from a .csv file

With security improvement to Excel, naming a .csv file .xls no longer works. Here is a small Python program to create a .xlsx file from a .csv file. You can execute this code from a BASIC program.

Usage: filename.csv spreadsheet.xlsx

You will need to install openpyxl, pip install openpyxl

import sys
import csv
from openpyxl import Workbook

csvfilename = sys.argv[1]
excelfilename = sys.argv[2]

wb = Workbook()
ws =

with open(csvfilename) as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=’,’)
    for row in csv_reader: