Commands
The AccuZIP6 Commands Source is designed to help you manipulate your data by using one of the commonly used commands listed below, and to help you create your own commands.
These commands are for use in the AccuZIP6 Command window. For more information about the Command feature, refer to Contents under the Help menu of AccuZIP6.
Send an email to our support department or visit www.accuzip.com/chat if you need a member of the AccuZIP6 support staff to create a command for you.
Fix Private Mail Box (PMB) Addresses
When an address begins with the PMB number, this command puts the street number and street name in front of the PMB. Read More
Merge Address Fields
Merges data from two address fields into one. Read More
Merge Fields from Duplicate Records Into One
If you have duplicate records in a file that you wish to merge together into a single record, this command and process will do that. Read More
Merge names that have the same address
If you have multiple records with the same address but different names in your database, this command and the small program that you can download will combine the names that share the same address into one record, and it will remove the duplicate addresses from the database. Read More
Merge two files together
Here is an easy way to merge two files together using the Command feature Read More
Merge Data from Duplicate Records into 1 record and 1 Field
Combine information from up to 3 different fields and 30 duplicate records into one record.
Read More
Add Leading Zeros to ZIP
For ZIP Codes missing leading zeros, this command will add them. Read More
Add Sequence Numbers to a Database
Adds sequence numbers to a field in your database. Read More
Remove Leading Zeros from Address
Removes leading zeros from street number. Read More
Remove last word from a field
Strips the last word out of a field. Read More
Remove the Last Number from a field
Strips a field of the last number that appears in the field. Read More
Remove Non-keyboard characters from any field
Use this command to remove any character from a field that cannot be typed from the Keyboard
Read More
Move first word in a field to the end of the field or to another field
The following command will take the first word in a field and move it to the end of the field. Read More
Move Address2 into Address if Address is empty.
If you have addresses in the address2 field instead of address, and address is empty, this command will move the address2 data into address. Read More
Transfer the last word in a field to another field
Strips the last word of a field and moves the last word to a field of your choice. Read More
Insert a comma into a number when the number is larger than 999
This command will place a comma in the correct spot of a number when the number is larger than 999. Example: The command changes 1000 to 1,000. Read More
Insert a comma between last and first names in FIRST field
In the FIRST field, if you have last names followed by first names with a space in between, this command will replace that space with a comma, in order to make the Parse feature separate the fields properly. Read More
Insert Space in Full name
This command will take a name in the field called First is camelCase formatted and insert a space between first and last name Read More
Insert Slashes into a field with a date
When the field containing a date is a 6-digit number, this command will insert slashes after the month and the day. Read More
Insert slashes into a field that contains a date
Assuming the format of the date is MMDDYYYY or MMDDYY, here is a command that will insert slashes so the end results looks like: MM/DD/YYYY or MM/DD/YY Read More
Insert Commas into proper places within a number
The following command will insert a comma into a number for numbers as large as 999999999. In that example, it'll change that field to 999,999,999. Read More
Swap last and first at the comma (change last, first to first last)
This command moves anything before the comma to the end of the field, after what originally appears after the comma (change Last Name, First Name to First Name Last Name) Read More
Convert the Barcode to ZIP4+DP Digits
Puts the Zip+4 and Delivery Point into the barcode field. Read More
Standardize Rural Routes
Standardizes rural route addresses for better validation accuracy. Read More
Sorting a Number in a Character Field
This command puts the numbers in a character type field in a correct numeric sequence. Read More
Close a database
This command will allow you to close a database. It can be useful when you want to add a close database event to a script. Read More
Separate Address and Address2 when they're in the same field and boxes are in between
This command will move the address2 information into a field named address2. Read More
Launch a .bat file
This command allows you to use the command feature to call an external program through running a .bat file. Read More
Add Errno_ Definition field
This command will add a field called errno_desc to the database and then fill errno_desc with the errno_ code description. Read More
Create an Excel file with count by State
Run this command to export a count by state as an Excel file Read More
Learn which records qualify for HD, HD+ or Saturation Rates
This command marks records that have enough pieces in a route to qualify for High-Density rates (or better). After running this command, show the marked records. Run this command after address validation. Read More
Weed out unwanted routes from EDDM List
Run this command on your EDDM List to delete all ZIP/Route combinations that are not in the list of those you want to mail. Read More
Rename maildat files in presort folder
Automatically rename your presort's maildat files, appending the Job ID to the maildat file names. Read More
Import hundreds of lists at once
This command allows you to import several files at once, combining all files into one database.
In order for this to work, all of your files will have to have the same field structure, and the files will have to be in the same directory. Read More
Add a package break mark to non-packaged based presort file
If you need a "*" in the pkgmark_ field on package breaks, then use the following code to add this. Read More
Add County Information to Simplified Lists
If you are creating an EDDM/Simplified Mailing List and you want to claim In-County Rates, those records have to include the county information in it. Considering you can't validate a record with no address, you can use this command to create and populate the Countynm_ and countyno_ fields, and then choose In-County Rates on the presort setup window to get your in-county rates claimed. Read More
Errno_ Description
This command will create a field named errno_desc and it will fill in this field with errno_ descriptions for all of the undeliverable addresses in the list. Read More
Export out of AccuZIP6 as Pipe delimited text
This command will export your open database as a pipe delimited (|) text file. The location of the file is built into the command. Read More
Export as different file types and specify fields
Export your data from the Command window using the instructions below. Read More
Export database name with Date Stamp added to the name
This command exports your database and automatically adds the date stamp in YYMMDD format Read More
Export as tab delimited text with a header
Use this command to export your data as a tab separated text file with a header record: Read More
Add a counter for each container and bundle to an export
This command will add two fields that will act as counters for the amount of pieces in a tray or sack and the amount of pieces in a bundle, so these numbers will reset at 1 for each new bundle or tray. Read More
Continuous Bundle Numbers
If you would like your bundle numbers to be continuous throughout the presorted file rather than restarting at the next tray you can use the following command to accomplish that. Read More
Parse Address Command
This command works separates address, city , state, and ZIP Code into their respective fields when this information appears in the field named Address and nothing is in City, St, or Zip Read More
Parse Name and Address
If you have the name, address, city, st, and zip all in one single field, assign the field named Address to that field, and this command will parse that data in to their respective fields. Read More
Generate a random number of any length
This command will generate a guaranteed Random number in a Character or Numeric Field. Read More
Generate unique, random 4-digit numbers in a list
Generate a random 4-digit number in a field called "record" in your list Read More
Select a group of records in a command
If you would like to use the command feature to get a selection of records on your screen instead of the search editor you can use this command. Read More
Split Database into equal numbered record databases
If you need to split your database into multiple databases of an equal number of records, you can use this command to do that. Read More
Count Characters in a Field
If you want to count the number of characters in a particular field, you can run the following command Read More
Combine multiple people at the same address into one record
This command will combine multiple people at the same address into one record. Read More
Combine multiple records into one record that have the same last name at the same address
When you have more than one record at the same address, and both with the same last name, they'll be combined into The LastName Family Read More
Compare address in all records and mark the longest
The command below counts the number of characters in the field named Address and marks the record that has the largest number of characters Read More
Add a field to the beginning of a database
This command adds a field to your database and inserts it at the beginning of the table structure.
Read More
Add a seed record to a database
You can use this Command to add a new record to any file with data in fields you specify Read More
Fill a field with a descending record number
This command that will populate a character type field named RECORD with sequence numbers in descending order:
Read More
Add A Blank Record Between Trays
The command will add a blank record between the trays, now you can export the list to whatever format you need
Read More
Reverse MoveDate_ format
If you would like to reverse the format of the NCOALink MoveDate_ field so that it is month then year, use this command. Read More
Issue a group number, count and delete indicator to Dups
If you would like to have a group number assigned to you duplicate records as well as a count and a delete indicator, download the following command Read More
Create a CSV of your Data Structure with field lengths
This command creates a Comma-Separated file (csv) of the Database Structure with the Start-Stop Character Positions for each field in the database. Read More
Create a list of SCF and NDC counts
This command will examine an opened database and will create a new database that lists all of the SCF and NDC facilities for the records in that database, and the amount of records in each facility. Read More
Add NDC field and data to your database
If you want to add a NDC field to your database and populate it with the 3 digit NDC ZIP based on your 5-digit ZIP Code, then open your database, pull down the Edit menu to Command, and run this command Read More
Mark records within Nth days of todays date
This command will allow you to mark or fill records if a date type field in your database is within Nth number of days of today's date. Read More
Mark when date field data is within 7 days of current date
Here's a command that will mark the records in your list where the field named entry_date contains dates that are within seven days of the current date Read More
Add SCF and Zone information to your database
The following command will add fields named SCF and Zone, and populate the respective fields with the SCF 3 digit ZIP Codes and Zone numbers. Read More
Create a break when information changes in a field
If you would like to create a break mark when information changes in a field, follow the instructions below. Read More
Mark Invalid ZIP Codes in a database
Use this command to mark Invalid ZIP Codes in your database. This makes it so you can identify Invalid ZIP Codes in a script, as you won't have to pull down Select to Show > Invalid ZIP Codes. Read More
Pause for Nth Seconds after a function
If you need a command or script to pause for Nth seconds before continuing, use the following line in a command.
Read More
Extract a file with a command
To extract or unzip a .zip file with the command feature, open a database and pull down the Edit menu to Command, then run this command: Read More
Rename and relocate the eReport.pdf with a command
This command and either copy or move the report file to a secondary location in addition to renaming it Read More
Add records and split names based on first
This command will duplicate a record and split the name information into the added records when you have multiple names separated by a comma in the field named "FIRST" Read More
Change name of your reports from file name.pdf to CASS Certificate.pdf
If you want to rename the PDF of your CASS Certificate, calling it CASS CERTIFICATE.PDF, run this command Read More
Convert number 1234 to One Thousand Two Hundred Thirty Four
The following command will convert ANY numeric value to its English equivalent. Read More
Delete a field if the field is blank for all records
Here is the command to delete a field (column) from the database if all of the records are blank in that field. Read More
Add a date to a field
Add the current date to a character field Read More
Create a new database of unique records based on any field
If you would like to create a separate file for all unique records based on any field you can download the following command.
Read More
Compress a presort folder into a .zip file
Use this command to compress a presort folder into a .zip file. Read More
Calculate distance for all records from any zip
If you would like AccuZIP6 to fill in a distance field with the miles from any particular zip code for all records, then download and run the following command. Read More
Calculate distance from up to 20 different locations
This command will calculate the distance from up to 20 different locations and write out 20 different Excel files with the records that are the closest to those locations. Read More
Calculate a prorated cost for any amount
If you would like to prorate a cost for any amount you can use the following command to do so.
This is useful if you are selling a service that is based on an annual cost and someone needs to purchase it for a portion of that. Read More
Delete when there are Nth number of the same record
Use this command you would like to remove a set of records when there are Nth number or more of the same record Read More
Convert Currency to English
EXAMPLE: $19,971.83
CONVERT: NINETEEN THOUSAND, NINE HUNDRED SEVENTY ONE DOLLARS AND 83/00 CENTS Read More
Count the number of words in a field
In this command, the number of words in the Address field will be tabulated in a field named countadd:
Read More
Eliminate Multiple Spaces Between Words
This command will eliminate double spaces (and more spaces) in between words in a field, so there will only be a single space in between words: Read More
Erase Address2 when Apt number is in Address & Address2
If you find that some of the records in your database have apartment number information in the address field and that information is duplicated in the address2 field, this command deletes the information out of address2 when there is a match. Read More
Quick CASS and NCOALink report
If you would like to print out a quick CASS/NCOALink and ANKLink report you can use this handy command. Read More
Create an Excel file with count on 5-digit ZIP Codes
This command will create an excel file listing each ZIP Code in your database and the quantity in each ZIP. Read More
Launch .exe from Command Window
If you need to launch an .exe file from the command window, here is the command that will do it.
Read More
Center data in a field
In case you want to center the data in a field, perhaps for the purpose of exporting your data in a centered format, this expression centers the field named First in a 75 character line Read More
Mark, Group and Count duplicates in your database
Use this command to assign a group ID to the duplicates in your database as well as a count on how many are in each group and the priority record based on what you selected in the duplicate setup window. Read More
Count marked records and fill count into another field
This command can take the total number of times a given value is in a field, and put the count into another field. In the example below, if you have 50 marked records, it'll put the number 50 into field1 for every marked record. Read More
Populate City and St when you have only address and ZIP
If you have a need to populate the City and St fields when only the ZIP is available then use the following command. Read More
Mark Records that have a non-alphanumeric character in field
This command will mark records that include a character that's neither a letter nor a number Read More
Combine multiple record information into one record
This command will combine the information in any field to the priority duplicate record separated by commas. If you have matching records that have information in a field that you would like in one record then use this command. Read More
Duplicate Records based on a value in a field
Change the word fieldname to the name of the field that contains the quantity. Read More
Creating a new database with family members combined
If you would like to combine family members into one record to save on postage and still list everyone on the piece you can use the following command. Read More
Add Database name to a field in your database
This command adds a field name then fills the database name into that field Read More
Change the name and/or width of a field
The following command changes the name of the field named zipcode to zip. Read More
Fill Leading Zeros into the ZIP field
Use this command before you validate your database when you're importing an Excel file that has east coast or Puerto Rican addresses (ZIP Codes that have leading zeros). Read More
Add a Column to your database using the command feature
NOTE:Replace "fieldname" with the name that you would like to use. The "c(75)" represents a character type field with a length of 75 spaces wide Read More
Copy a field from one list to another when records match
If you want to compare two databases and, when there are matches between records in the two databases, take the contents of a field (or fields) from one database and add it to the matching records of the other database, use this command. Read More