Add a package break mark to non-packaged based presort file

Build your list of AccuZIP6 commands by requesting commands and sharing commands with other users

Moderators: Chrissy, Steve, Terry, Donna, Dave, Eric, MartyH, Kristen, Geoff, Vince

Post Reply
User avatar
Dave
Site Admin
Posts: 620
Joined: Wed Sep 20, 2006 3:20 pm

Add a package break mark to non-packaged based presort file

Post by Dave » Thu Feb 05, 2015 12:28 pm

If you need a "*" in the pkgmark_ field on package breaks, then use the following code to add this.

Presort your list as normal.
Click the Print Labels option in the Print Presort screen.
Select Disk File for the Output format.
Select ALL fields, and export to an AccuZIP6 5x database.
Open the Edit|Command window and paste the following:

Code: Select all

ON ERROR com_message=message()
comAlias=ALIAS()
SET SAFETY OFF

SELECT GPB_ID,cont_id FROM (comAlias) GROUP BY 1,2 INTO TABLE "C:\unique.dbf" readwrite
	USE
	USE ("C:\unique.dbf") IN 0 ALIAS "unique"
SELECT(comAlias)
	INDEX ON allt(cont_id)+allt(GPB_ID) tag mytag
SELECT ("unique")
	alter table alias() add column sequence c(7)
	replace sequence with &comAlias..sequence for SEEK(allt(cont_id)+allt(GPB_ID),comAlias)
SELECT ("unique")
	INDEX ON allt(sequence)+allt(GPB_ID) tag mytag
SELECT(comAlias)
	replace Pkgmark_ with "*" for SEEK(allt(sequence)+allt(GPB_ID)  ,"unique")
USE IN IIF(USED("unique"),SELECT("unique"),0)
This will add the * in the Pkgmark_ field for package breaks on non-packaged based mailings.

Post Reply