<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vistapedia.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Shabiel</id>
	<title>VistApedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://vistapedia.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Shabiel"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php/Special:Contributions/Shabiel"/>
	<updated>2026-04-06T14:58:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://vistapedia.com/index.php?title=Fancy_ZSTEP_GTM&amp;diff=19652</id>
		<title>Fancy ZSTEP GTM</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Fancy_ZSTEP_GTM&amp;diff=19652"/>
		<updated>2025-01-08T21:54:05Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: Added detection of a write to the screen.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;General procedure:&lt;br /&gt;
# Put a breakpoint on the code you want to debug: ZB UPDATE^DIE&lt;br /&gt;
# Set special ZSTEP&lt;br /&gt;
# Execute the code you want to debug: S FDA(3.1,&amp;quot;?+1,&amp;quot;,.01)=&amp;quot;BOO&amp;quot; D UPDATE^DIE(,$NA(FDA))&lt;br /&gt;
# Once you hit the breakpoint, type ZSTEP INTO to activate stepping. The entire routine execution will be shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regular ZSTEP (save dev and restore dev after each line)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n oldio s oldio=$i u 0 w $t(@$zpos),! b  u oldio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detect if a variable has changed (in this case, $data of DIC(0)):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
b:($g(olddic)&#039;=$d(DIC(0)))  s olddic=$d(DIC(0)) zstep into&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detect if a write is made ($X changes):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $zstep=&amp;quot;b:$g(oldx)&#039;=$x  s oldx=$x zstep into&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print source code while executing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S $ZSTEP=&amp;quot;W $ZPOS,?20,$T(@$ZPOS),! ZSTEP INTO&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine these together, for example, to print all executed lines and stop when a variable changes. Here&#039;s how I did that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n oldio s oldio=$i u 0 b:($g(olddic)&#039;=$d(DIC(0)))  s olddic=$d(DIC(0)) zp @$zpos u oldio zstep into&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17563</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17563"/>
		<updated>2019-05-23T17:42:41Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Patient Merge Use Issues with FOIA (as of February 2019) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt]]   &lt;br /&gt;
* Kids: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with FOIA (as of February 2019) ===&lt;br /&gt;
* Two packages have custom routines that affect record merge: CLINICAL INFO RESOURCE NETWORK (RG) and NDBI (A7R). The first one tries to talk to the MPI; and second one references a routine that doesn&#039;t exist. You need to go to the package file and remove the patient file merge from field 20 for each of those entries. Here&#039;s a screenscrape:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OSEHRA&amp;gt;D P^DI&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
VA FileMan 22.2&lt;br /&gt;
&lt;br /&gt;
Identity = MANAGER,SYSTEM       SM       &lt;br /&gt;
&lt;br /&gt;
Select OPTION: ENTER OR EDIT FILE ENTRIES  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Input to what File: PACKAGE&lt;br /&gt;
     1   PACKAGE                          (144 entries)&lt;br /&gt;
     2   PACKAGE INTERFACE                (122 entries)&lt;br /&gt;
     3   PACKAGE SIZE                     (5310 entries)&lt;br /&gt;
     4   PACKAGE TYPE                     (530 entries)&lt;br /&gt;
CHOOSE 1-4: 1  PACKAGE                    (144 entries)&lt;br /&gt;
EDIT WHICH FIELD: ALL// 20  AFFECTS RECORD MERGE  (multiple)&lt;br /&gt;
   EDIT WHICH AFFECTS RECORD MERGE SUB-FIELD: ALL// .01  FILE AFFECTED&lt;br /&gt;
   THEN EDIT AFFECTS RECORD MERGE SUB-FIELD: &lt;br /&gt;
THEN EDIT FIELD: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select PACKAGE NAME: RG&lt;br /&gt;
     1   RG  CLINICAL INFO RESOURCE NETWORK     RG&lt;br /&gt;
     2   RGUT  RUN TIME LIBRARY     RGUT&lt;br /&gt;
CHOOSE 1-2: 1  CLINICAL INFO RESOURCE NETWORK     RG&lt;br /&gt;
Select FILE AFFECTED: PATIENT// @&lt;br /&gt;
   SURE YOU WANT TO DELETE THE ENTIRE FILE AFFECTED? Y  (Yes)&lt;br /&gt;
Select FILE AFFECTED: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select PACKAGE NAME: A7R  NDBI     A7R&lt;br /&gt;
Select FILE AFFECTED: PATIENT// @&lt;br /&gt;
   SURE YOU WANT TO DELETE THE ENTIRE FILE AFFECTED? Y  (Yes)&lt;br /&gt;
Select FILE AFFECTED: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select PACKAGE NAME: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. You do not need to use this to use the package, but it makes finding the potential duplicate patients much easier. To undo this, in routine XDRDCOMP, change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S XDRFL=$$FILE^XDRDPICK(1) Q:XDRFL&#039;&amp;gt;0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S XDRFL=$$FILE^XDRDPICK(0) Q:XDRFL&#039;&amp;gt;0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in routine XDRDQUE, comment out this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N XDRNOPT S XDRNOPT=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed. I traced it, and it usually means that it&#039;s running through the package routines that do the merge (field 20 in the package file), and one of them decided to abort. Check to see which package that is, and you may have to debug to see why it decided to reject the merge.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17562</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17562"/>
		<updated>2019-05-23T17:20:40Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Patient Merge Use on VISTA (Quick and Dirty) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt]]   &lt;br /&gt;
* Kids: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with FOIA (as of February 2019) ===&lt;br /&gt;
* Two packages have custom routines that affect record merge: CLINICAL INFO RESOURCE NETWORK (RG) and NDBI (A7R). The first one tries to talk to the MPI; and second one references a routine that doesn&#039;t exist. You need to go to the package file and remove the patient file merge from field 20 for each of those entries.&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. You do not need to use this to use the package, but it makes finding the potential duplicate patients much easier. To undo this, in routine XDRDCOMP, change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S XDRFL=$$FILE^XDRDPICK(1) Q:XDRFL&#039;&amp;gt;0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S XDRFL=$$FILE^XDRDPICK(0) Q:XDRFL&#039;&amp;gt;0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in routine XDRDQUE, comment out this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N XDRNOPT S XDRNOPT=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed. I traced it, and it usually means that it&#039;s running through the package routines that do the merge (field 20 in the package file), and one of them decided to abort. Check to see which package that is, and you may have to debug to see why it decided to reject the merge.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17561</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17561"/>
		<updated>2019-05-23T17:17:12Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Patient Merge Use Issues with FOIA (as of February 2019) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt]]   &lt;br /&gt;
* Kids: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with FOIA (as of February 2019) ===&lt;br /&gt;
* Two packages have custom routines that affect record merge: CLINICAL INFO RESOURCE NETWORK (RG) and NDBI (A7R). The first one tries to talk to the MPI; and second one references a routine that doesn&#039;t exist. You need to go to the package file and remove the patient file merge from field 20 for each of those entries.&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. You do not need to use this to use the package, but it makes finding the potential duplicate patients much easier. To undo this, in routine XDRDCOMP, change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S XDRFL=$$FILE^XDRDPICK(1) Q:XDRFL&#039;&amp;gt;0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S XDRFL=$$FILE^XDRDPICK(0) Q:XDRFL&#039;&amp;gt;0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in routine XDRDQUE, comment out this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N XDRNOPT S XDRNOPT=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17560</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17560"/>
		<updated>2019-05-23T17:11:34Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Patient Merge Use Issues with WV */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [https://foia-vista.osehra.org/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt]]   &lt;br /&gt;
* Kids: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with FOIA (as of February 2019) ===&lt;br /&gt;
* Two packages have custom routines that affect record merge: CLINICAL INFO RESOURCE NETWORK (RG) and NDBI (A7R). The first one tries to talk to the MPI; and second one references a routine that doesn&#039;t exist. You need to go to the package file and remove the patient file merge from field 20.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17559</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17559"/>
		<updated>2019-05-23T16:15:36Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [http://mirrors.medsphere.org/pub/downloads.va.gov/files/FOIA/Software/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt]]   &lt;br /&gt;
* Kids: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with FOIA (as of February 2019) ===&lt;br /&gt;
* Two packages have custom routines that affect record merge: CLINICAL INFO RESOURCE NETWORK (RG) and NDBI (A7R). The first one tries to talk to the MPI; and second one references a routine that doesn&#039;t exist. You need to go to the package file and remove the patient file merge from field 20.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17558</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17558"/>
		<updated>2019-05-23T15:59:55Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [http://mirrors.medsphere.org/pub/downloads.va.gov/files/FOIA/Software/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt]]   &lt;br /&gt;
* Kids: [[:File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt]]&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt&amp;diff=17557</id>
		<title>File:JJIH PT MERGE SOFTWARE UPDATES 0110.kids.txt</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.kids.txt&amp;diff=17557"/>
		<updated>2019-05-23T15:56:33Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt&amp;diff=17556</id>
		<title>File:JJIH PT MERGE SOFTWARE UPDATES 0110.txt</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=File:JJIH_PT_MERGE_SOFTWARE_UPDATES_0110.txt&amp;diff=17556"/>
		<updated>2019-05-23T15:55:14Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17555</id>
		<title>Patient Merge</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Patient_Merge&amp;diff=17555"/>
		<updated>2019-05-23T15:29:15Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Prerequisite Set-up Before Using Patient Merge */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Written by Sam Habiel. Questions? http://groups.google.com/group/hardhats.&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
Patient Merge is a complex piece of software. Be sure to read the [http://www.va.gov/vdl/application.asp?appid=2 manual]. This will provide an overview of how to use it with WV. I still get errors here and there due to the way WV has some fields that point to routines that don&#039;t exist. I get unexpected behavior here and there; the point is that it looks like it will need more work in the future.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use Issues with WV ===&lt;br /&gt;
There are few WV-related issues with Patient Merge that first need to be resolved.&lt;br /&gt;
* Due to various issues on how the MPI Parameters and the Local Site are set-up, the software may try to contact the MPI to resolve a merge, and fail to merge as a result. The actual issue should be present in any WV installation that uses the site number of 050; as the MPI thinks when comparing ICN&#039;s that start with 50 (from 050) that they are national since 050 isn&#039;t the same 50. An MPI bug to be sure, but why bother?&lt;br /&gt;
* Patch [http://mirrors.medsphere.org/pub/downloads.va.gov/files/FOIA/Software/Patches_By_Application/XT-KERNEL%20TOOLKIT/XT-7P3_SEQ-94_PAT-113.TXT XT*7.3*113] takes away the ability for the local site to search the patient file for duplicates, and relegates that ability only to the Central MPI. It looks like it has affected several places; so I need to fix all these different places. For now, I fixed only one routine which matters to me: Potential Duplicate Patient Search.&lt;br /&gt;
* X-ref ALK3 in file 15 on the Merge Status field has a bug in it. A completed merge (Merge Status = Merged) does not delete the ALK index entry. Thus, the IHS patient lookup routine erroneously says that the patient is a potential duplicate patient even though the patient has been merged already. I am not sure where the bug lies (IHS patient lookup or the Patient Merge software), but the ALK x-ref documentation says it&#039;s supposed to be deleted when it&#039;s merged.&lt;br /&gt;
&lt;br /&gt;
I created a patch to resolve these issues and you can find it here. This patch depends XT*7.3*113, as it fixes a change in that patch.&lt;br /&gt;
* Description: [http://bazaar.launchpad.net/~sam-habiel/astronaut-vista-server/enhancements/download/sam.habiel%40gmail.com-20110825211457-zvgppwvs0tgbsip9/jjih_pt_merge_softwa-20110825211406-sj7iowsxtttd0sa3-2/JJIH_PT_MERGE_SOFTWARE_UPDATES_0100.txt JJIH_PT_MERGE_SOFTWARE_UPDATES_0100.txt]&lt;br /&gt;
* Kids: [http://bazaar.launchpad.net/~sam-habiel/astronaut-vista-server/enhancements/download/sam.habiel%40gmail.com-20110825211457-zvgppwvs0tgbsip9/jjih_pt_merge_softwa-20110825211406-sj7iowsxtttd0sa3-1/JJIH_PT_MERGE_SOFTWARE_UPDATES_0100.kids JJIH_PT_MERGE_SOFTWARE_UPDATES_0100.kids]&lt;br /&gt;
&lt;br /&gt;
=== Prerequisite Set-up Before Using Patient Merge ===&lt;br /&gt;
Your user has to have access to the &#039;&#039;&#039;XDR MAIN MENU&#039;&#039;&#039; Menu.&lt;br /&gt;
&lt;br /&gt;
Your user has to have the following keys:&lt;br /&gt;
* &#039;&#039;&#039;XDR&#039;&#039;&#039; (for day to day use of Patient Merge)&lt;br /&gt;
* &#039;&#039;&#039;XDRMGR&#039;&#039;&#039; (for Manager Operations: doing the actual merge, Site Parameters)&lt;br /&gt;
* &#039;&#039;&#039;DG ELIGIBILITY&#039;&#039;&#039; (ditto)&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Set-Up on VISTA ===&lt;br /&gt;
You need to set-up your site parameters first. If you want to be able to merge patients immediately, you need to set &amp;lt;tt&amp;gt;DAYS BEFORE FINAL VERIFY&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;DAYS BETWEEN VERIFY AND MERGE&amp;lt;/tt&amp;gt; to zero, otherwise you will have to wait before being able to merge patients. This is done as a precaution. Once patients are merged, there is no way to unmerge them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XDR MAIN MENU &amp;gt; Manager Utilities &amp;gt; Edit Site Parameters&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Select Manager Utilities Option: edt  Edit Site Parameters&lt;br /&gt;
&lt;br /&gt;
Select DUPLICATE RESOLUTION FILE TO BE CHECKED: PATIENT  &lt;br /&gt;
         ...OK? Yes//   (Yes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Image:PtMergeSiteParam.png]]&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge Use on VISTA (Quick and Dirty)===&lt;br /&gt;
If you have a couple of duplicate patients and are sure about them, you can do a quick merge as follows. This is not the preferred scenario.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
   XDRO   Operations ...&lt;br /&gt;
   XDRU   Utilities ...&lt;br /&gt;
   XDRM   Manager Utilities ...&lt;br /&gt;
&lt;br /&gt;
Select Duplicate Resolution System Option: &amp;lt;b&amp;gt;XDRU&amp;lt;/b&amp;gt;  Utilities&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)^M&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates^M&lt;br /&gt;
   DSS    Display Search Status^M&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]^M&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File^M&lt;br /&gt;
   VAL    Identify Potential Merge Problems^M&lt;br /&gt;
   PRNT   Print List of File Duplicates^M&lt;br /&gt;
   SCAN   Scan Possible Duplicates^M&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields^M&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries^M&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT    &lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: &lt;br /&gt;
   6    ZZ PATIENT,TEST TWO          &amp;lt;A&amp;gt;    M 12-25-1957                2&lt;br /&gt;
   7    ZZ WRONG,PATIENT                    F 01-01-2001          &lt;br /&gt;
                                                                       456552077&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   8    ZZ,WRONG                            M 06-06-1961 458414058&lt;br /&gt;
                                                                       458414058&lt;br /&gt;
                                                                        45841405&lt;br /&gt;
8&lt;br /&gt;
   9    ZZANDERSON,BRANDON                  M 04-09-1988 468992445&lt;br /&gt;
                                                                       468992445&lt;br /&gt;
          &amp;lt;Unresolved potential duplicate&amp;gt;&lt;br /&gt;
   10    ZZBARNES,ZZJUSTON                  M 01-01-2001 016996491&lt;br /&gt;
                                                                       016996491&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-10: ^&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: ADD  Add Verified Duplicate Pair&lt;br /&gt;
Add entries from which File: PATIENT&lt;br /&gt;
&lt;br /&gt;
* No potential duplicate threshold % check will be calculated for PATIENTS&lt;br /&gt;
Select PATIENT: ZZ&lt;br /&gt;
   1    ZZ LAB,TEST                         M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
   2    ZZ LAB,TESTTHREE                    F 03-03-1950 749030350P&lt;br /&gt;
                                                                        10000033&lt;br /&gt;
   3    ZZ LAB,TESTTWO                      M 11-04-1988 749110488P&lt;br /&gt;
                                                                        10000011&lt;br /&gt;
   4    ZZ PATIENT,TEST ONE          &amp;lt;A&amp;gt;    F 01-24-1945 000003322      1&lt;br /&gt;
   5    ZZ PATIENT,TEST THREE        &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
ENTER &#039;^&#039; TO STOP, OR&lt;br /&gt;
CHOOSE 1-5: 1&lt;br /&gt;
  ZZ LAB,TEST                               M 11-04-1970 749110470P&lt;br /&gt;
                                                                        10000001&lt;br /&gt;
    Another  PATIENT: &lt;br /&gt;
ZZ PATIENT,TEST THREE&lt;br /&gt;
                                     &amp;lt;CA&amp;gt;   M 01-15-1968                3&lt;br /&gt;
&lt;br /&gt;
You will be adding the following pair of [[record~|Record]]s to the duplicate [[record~|Record]] file:&lt;br /&gt;
&lt;br /&gt;
     [[RECORD~|Record]]1:  ZZ PATIENT,TEST THREE&lt;br /&gt;
     [[RECORD~|Record]]2:  ZZ LAB,TEST&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;Enter&amp;gt; to continue or &#039;^&#039; to exit:   Ok, continuing, hold on ...&lt;br /&gt;
&lt;br /&gt;
         [[RECORD~|Record]]1 contains fewer data elements, usually this would indicate&lt;br /&gt;
                 that this [[record~|Record]] would be merged INTO the other.&lt;br /&gt;
&lt;br /&gt;
Determine if these entries ARE or ARE NOT duplicates.&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  NAME                    &amp;quot;ZZ LAB,TEST&amp;quot;            &amp;quot;ZZ PATIENT,TEST THR&lt;br /&gt;
                                                       EE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SEX                     MALE                     MALE&lt;br /&gt;
&lt;br /&gt;
****  DATE OF BIRTH           11/04/1970               01/15/1968&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      MARITAL STATUS                                   UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      OCCUPATION                                       &amp;quot;UNEMPLOYED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      CHECK FOR DUPLICATE     YES                      YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      SOCIAL SECURITY NUMB    &amp;quot;749110470P&amp;quot;             &lt;br /&gt;
      ER                                               &lt;br /&gt;
&lt;br /&gt;
      PSEUDO SSN REASON       NO SSN ASSIGNED          &lt;br /&gt;
&lt;br /&gt;
      REMARKS                 &amp;quot;[PATIENT DIED ON 07     &lt;br /&gt;
                              /14/11]&amp;quot;                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [CITY                             &amp;quot;MIAMI&amp;quot;&lt;br /&gt;
      ]                                                &lt;br /&gt;
&lt;br /&gt;
      PLACE OF BIRTH [STAT                             FLORIDA&lt;br /&gt;
      E]                                               &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      WHO ENTERED PATIENT     ADMINISTRATOR,SYSTEM     &lt;br /&gt;
&lt;br /&gt;
      DATE ENTERED INTO FI    3/25/11                  &lt;br /&gt;
      LE                                               &lt;br /&gt;
&lt;br /&gt;
      STREET ADDRESS [LINE                             &amp;quot;123 ANYWHERE&amp;quot;&lt;br /&gt;
       1]                                              &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP+4                                            46123&lt;br /&gt;
&lt;br /&gt;
      CITY                                             &amp;quot;AVON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      STATE                                            INDIANA&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ZIP CODE                                         &amp;quot;46123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      COUNTY                                           063&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE DT/TM                             7/24/05 17:37:52&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SOURC                             VAMC&lt;br /&gt;
      E                                                &lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE SITE                              BAD POINTER VALUE IN&lt;br /&gt;
                                                        FILE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      ADDRESS CHANGE USER                              STARTUP,SYSTEM&lt;br /&gt;
&lt;br /&gt;
      K-NAME OF PRIMARY NO                             &amp;quot;CLAUSE,SANTA&amp;quot;&lt;br /&gt;
      K                                                &lt;br /&gt;
&lt;br /&gt;
      K-RELATIONSHIP TO PA                             &amp;quot;FRIEND&amp;quot;&lt;br /&gt;
      TIENT                                            &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-ADDRESS SAME AS PA                             NO&lt;br /&gt;
      TIENT&#039;S?                                         &lt;br /&gt;
&lt;br /&gt;
      MOTHER&#039;S MAIDEN NAME                             &amp;quot;NITWIT,&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      SERVICE CONNECTED?      NO                       NO&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      EMPLOYMENT STATUS                                UNKNOWN&lt;br /&gt;
&lt;br /&gt;
      COVERED BY HEALTH IN                             NO&lt;br /&gt;
      SURANCE?                                         &lt;br /&gt;
&lt;br /&gt;
      PERIOD OF SERVICE                                OTHER REIMBURS. (NON&lt;br /&gt;
                                                       -VET)&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH           7/14/11 17:28:14         &lt;br /&gt;
&lt;br /&gt;
      DEATH ENTERED BY        WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
      SOURCE OF NOTIFICATI    INPATIENT AT VAMC        &lt;br /&gt;
      ON                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      DATE OF DEATH LAST U    7/14/11 17:28:14         &lt;br /&gt;
      PDATED                                           &lt;br /&gt;
&lt;br /&gt;
      LAST EDITED BY          WHITLOW,LACHERYL         &lt;br /&gt;
&lt;br /&gt;
****  PRIMARY ELIGIBILITY     EHR PATIENT              REIMBURSABLE INSURAN&lt;br /&gt;
      CODE                                             CE&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
****  PRIMARY LONG ID         &amp;quot;10000001&amp;quot;               &amp;quot;--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
      PRIMARY SHORT ID        &amp;quot;0001&amp;quot;                   &lt;br /&gt;
&lt;br /&gt;
      NAME COMPONENTS         2                        2&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      K-NAME COMPONENTS                                2&lt;br /&gt;
&lt;br /&gt;
****  LABORATORY REFERENCE    8                        3&lt;br /&gt;
&lt;br /&gt;
      TYPE                    VISTA OFFICE EHR         VISTA OFFICE EHR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      INTEGRATION CONTROL     500004122                500000002&lt;br /&gt;
      NUMBER                                           &lt;br /&gt;
&lt;br /&gt;
      ICN CHECKSUM            &amp;quot;432992&amp;quot;                 &amp;quot;140241&amp;quot;&lt;br /&gt;
&lt;br /&gt;
****  COORDINATING MASTER     INTRACARE HOSPITAL S     OFFICE OF INFORMATIO&lt;br /&gt;
      OF [[RECORD~|Record]]               YSTEM                    N SRV CNTR&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      LOCALLY ASSIGNED ICN    YES                      YES&lt;br /&gt;
&lt;br /&gt;
****  CMOR ACTIVITY SCORE     310                      110&lt;br /&gt;
&lt;br /&gt;
      SCORE CALCULATION DA    8/27/11                  8/27/11&lt;br /&gt;
      TE                                               &lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
      VETERAN (Y/N)?          NO                       NO&lt;br /&gt;
&lt;br /&gt;
****  KEENE PERSONAL ACCT     &amp;quot;123456&amp;quot;                 &amp;quot;343234&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         Record~|RECORD]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
PATIENT ELIGIBILITIES         1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
DISPOSITION LOG-IN DATE/T     1 entry                  1 entry&lt;br /&gt;
&lt;br /&gt;
KEENE ADMISSION ACCOUNT N     1 entry                  ---&lt;br /&gt;
&lt;br /&gt;
                              [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                              ZZ LAB,TEST              ZZ PATIENT,TEST THRE&lt;br /&gt;
                                                       E&lt;br /&gt;
                              CMOR SCORE = 310         CMOR SCORE = 110&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#33747]         [[RECORD~|Record]]2 [#3]&lt;br /&gt;
                    ZZ LAB,TEST              ZZ PATIENT,TEST THREE&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which [[record~|Record]] (1 or 2) should be MERGED INTO the other [[record~|Record]]: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
Do you want to ADD another pair (Y/N)? NO&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you add a verified duplicate, then you approve it for merge in the Operations Menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZWRONG,PATIENT                   --                [26877]&lt;br /&gt;
        ZZ WRONG,PATIENT                  --                [4949]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you approve the merge, then you schedule a job to merge it from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SCH  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
1  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@12:06:54)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400609.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see whether the merge process completed or not, here is how you do it.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ADD    Add Verified Duplicate Pair&lt;br /&gt;
   CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
   CHCK   Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
   DSS    Display Search Status&lt;br /&gt;
   EDIT   Edit the Status Field of a Duplicate [[Record~|Record]]&lt;br /&gt;
   FIND   Find Potential Duplicates for an Entry in a File&lt;br /&gt;
   VAL    Identify Potential Merge Problems&lt;br /&gt;
   PRNT   Print List of File Duplicates&lt;br /&gt;
   SCAN   Scan Possible Duplicates&lt;br /&gt;
   TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
   VIEW   View Duplicate [[Record~|Record]] Entries&lt;br /&gt;
&lt;br /&gt;
Select Utilities Option: CMP&lt;br /&gt;
&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827      08/27 12:06  C  08/27 12:07&lt;br /&gt;
  DATA CHECKING     08/27 12:06  C  08/27 12:06&lt;br /&gt;
  LAB SERVICE       08/27 12:06  C  08/27 12:06&lt;br /&gt;
  INTEGRATED BILL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  FEE BASIS         08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  NDBI              08/27 12:06  C  08/27 12:06&lt;br /&gt;
  ENROLLMENT APPL   08/27 12:06  C  08/27 12:06&lt;br /&gt;
  PATIENT FILE      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 2      08/27 12:06  C  08/27 12:06&lt;br /&gt;
      THREAD 3      08/27 12:06  C  08/27 12:07&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you ever see &amp;lt;tt&amp;gt;NO PAIRS LEFT&amp;lt;/tt&amp;gt; and then &amp;lt;tt&amp;gt;** STOPPED **&amp;lt;/tt&amp;gt;, it means that your patient merge failed.&lt;br /&gt;
&lt;br /&gt;
=== Patient Merge on VISTA (The Proper Way) ===&lt;br /&gt;
First, scan the patient file for possible duplicates. You do that from the Manager&#039;s menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: SRCH  Start/Halt Duplicate Search&lt;br /&gt;
Select file to be checked for duplicates: PATIENT  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                            Duplicate PATIENT Search&lt;br /&gt;
&lt;br /&gt;
Search Type  Date Completed     Status       hours:min       # [[Record~|Record]]s Checked&lt;br /&gt;
-----------  --------------     ------    --------------     -----------------&lt;br /&gt;
&lt;br /&gt;
BASIC        AUG 27,2011@12:48  COMPLETED          0:00      34939/34939 100.0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0 Potential Duplicate pairs added to the DUPLICATE [[RECORD~|Record]] FILE (#15)&lt;br /&gt;
&lt;br /&gt;
Do You wish to RUN a search (Y/N)? YES&lt;br /&gt;
Which type of Search do you wish to run ? (BASIC/NEW) BASIC// BASIC&lt;br /&gt;
This process will take a **LONG** time (known to exceed 100  hours),&lt;br /&gt;
but you CAN stop and restart the process when you want using&lt;br /&gt;
the options  OK? YES&lt;br /&gt;
Requested Start Time: NOW//  (AUG 27, 2011@13:16:58)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After you do that, you go to the Operations Menu, to Verify Potential Duplicates, then Approve them for Merging.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Resolution Operations Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: vpd  Verify Potential Duplicates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: zz&lt;br /&gt;
There are 77 choices.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          V         VERIFIED DUPLICATE&lt;br /&gt;
          N         VERIFIED, NOT A DUPLICATE&lt;br /&gt;
          U         UNABLE TO DETERMINE&lt;br /&gt;
          H         HEALTH SUMMARY&lt;br /&gt;
          R         REVIEW DATA AGAIN&lt;br /&gt;
          S         SELECT/REVIEW OVERWRITES&lt;br /&gt;
&lt;br /&gt;
Select [[Action~|Action]]: HEALTH SUMMARY// v  VERIFIED DUPLICATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    [[RECORD~|Record]]1 [#338]           [[RECORD~|Record]]2 [#333]&lt;br /&gt;
                    ZZFAKE,PATIENT           ZZFAKE,PATIENT&lt;br /&gt;
&lt;br /&gt;
     Select one of the following:&lt;br /&gt;
&lt;br /&gt;
          1         [[RECORD~|Record]]1 INTO [[RECORD~|Record]]2&lt;br /&gt;
          2         [[RECORD~|Record]]2 INTO [[RECORD~|Record]]1&lt;br /&gt;
&lt;br /&gt;
Which record (1 or 2) should be MERGED INTO the other record: [[RECORD~|Record]]1 INTO [[RECOR&lt;br /&gt;
D~|Record]]2// &lt;br /&gt;
&lt;br /&gt;
At the following [[prompt~|Prompt]] select a POTENTIAL DUPLICATE ENTRY.  If a selection&lt;br /&gt;
is not made, you will be given a chance to select from a list if you&lt;br /&gt;
want to.  Otherwise, you will be returned to the menu system.&lt;br /&gt;
&lt;br /&gt;
Select PATIENT: &lt;br /&gt;
Do you want to select from a list of potential duplicates? YES// n  NO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   APP    Approve verified duplicates for merging&lt;br /&gt;
   VPD    Verify Potential Duplicates&lt;br /&gt;
   ADR    Ancillary Data Review&lt;br /&gt;
&lt;br /&gt;
Select Operations Option: app  Approve verified duplicates for merging&lt;br /&gt;
&lt;br /&gt;
1  Entries are awaiting approval for merging  Return to continue...&lt;br /&gt;
&lt;br /&gt;
  1     ZZFAKE,PATIENT                    111-19-8541       [338]&lt;br /&gt;
        ZZFAKE,PATIENT                    111-18-8541       [333]&lt;br /&gt;
&lt;br /&gt;
Select entries to approve them for merging:  (1-1): 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you schedule the Merge through the Manager&#039;s Menu as before:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
Duplicate Manager Utilities Menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
Select Manager Utilities Option: sch  Schedule Process to Merge Verified Duplica&lt;br /&gt;
tes&lt;br /&gt;
&lt;br /&gt;
2  Entries Ready to be included in merge&lt;br /&gt;
This process will take a **LONG** time (usually over 15 hours, and sometimes&lt;br /&gt;
considerably longer), but you CAN stop and restart the process when you&lt;br /&gt;
want using the options.  OK? y  YES&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name for Merge Process: MERGE 20110827-02&lt;br /&gt;
START DATE/TIME: NOW  (AUG 27, 2011@13:50:13)&lt;br /&gt;
&lt;br /&gt;
Merge process &#039;MERGE 20110827-02&#039; for Verified Duplicates in File 2 scheduled&lt;br /&gt;
as task 400650.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   EDT    Edit Site Parameters&lt;br /&gt;
   LIST   List File Entries Identified in Preliminary Scan&lt;br /&gt;
   SCN    Preliminary Scan of File for Errors&lt;br /&gt;
   PRGM   Purge Merge Process File&lt;br /&gt;
   RES    Restart a Merge Process&lt;br /&gt;
   SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
   SRCH   Start/Halt Duplicate Search&lt;br /&gt;
   STOP   STOP an Active Merge Process&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checking the Status (CMP) in the Utilities Menu, we see that it&#039;s done:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
                                                       Current   Current&lt;br /&gt;
Merge Set             Start    Stat   Last Chk  Phase  File      Entry&lt;br /&gt;
&lt;br /&gt;
MERGE 20110827-02   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  DATA CHECKING     08/27 13:50  C  08/27 13:50&lt;br /&gt;
  LAB SERVICE       08/27 13:50  C  08/27 13:50&lt;br /&gt;
  INTEGRATED BILL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ACCOUNTS RECEIV   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  FEE BASIS         08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ICR - IMMUNOLOG   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  NDBI              08/27 13:50  C  08/27 13:50&lt;br /&gt;
  ENROLLMENT APPL   08/27 13:50  C  08/27 13:50&lt;br /&gt;
  PATIENT FILE      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 2      08/27 13:50  C  08/27 13:50&lt;br /&gt;
      THREAD 3      08/27 13:50  C  08/27 13:50&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample workflow for a Production System ===&lt;br /&gt;
Theokli Hotzoglou posted the menu that they made at Lutheran to make the steps more straightforward for the HIMS dept. Thanks Theokli!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
  CH     Check Pair of [[Record~|Record]]s to see if Duplicates&lt;br /&gt;
  VAL    Identify Potential Merge Problems&lt;br /&gt;
  ADD    Add Verified Duplicate Pair&lt;br /&gt;
  ADR    Ancillary Data Review&lt;br /&gt;
  APP    Approve verified duplicates for merging&lt;br /&gt;
  HS     Health Summary Coordinator&#039;s Menu ...&lt;br /&gt;
  SCH    Schedule Process to Merge Verified Duplicates&lt;br /&gt;
  TSF    Tally STATUS and MERGE STATUS Fields&lt;br /&gt;
  CMP    Check Merge Process Status (reverse order)&lt;br /&gt;
  MAIL   MailMan Menu ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Fancy_ZSTEP_GTM&amp;diff=17495</id>
		<title>Fancy ZSTEP GTM</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Fancy_ZSTEP_GTM&amp;diff=17495"/>
		<updated>2019-01-28T17:18:35Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: Created page with &amp;quot;General procedure: # Put a breakpoint on the code you want to debug: ZB UPDATE^DIE # Set special ZSTEP # Execute the code you want to debug: S FDA(3.1,&amp;quot;?+1,&amp;quot;,.01)=&amp;quot;BOO&amp;quot; D UPDA...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;General procedure:&lt;br /&gt;
# Put a breakpoint on the code you want to debug: ZB UPDATE^DIE&lt;br /&gt;
# Set special ZSTEP&lt;br /&gt;
# Execute the code you want to debug: S FDA(3.1,&amp;quot;?+1,&amp;quot;,.01)=&amp;quot;BOO&amp;quot; D UPDATE^DIE(,$NA(FDA))&lt;br /&gt;
# Once you hit the breakpoint, type ZSTEP INTO to activate stepping. The entire routine execution will be shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regular ZSTEP (save dev and restore dev after each line)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n oldio s oldio=$i u 0 w $t(@$zpos),! b  u oldio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detect if a variable has changed (in this case, $data of DIC(0)):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
b:($g(olddic)&#039;=$d(DIC(0)))  s olddic=$d(DIC(0)) zstep into&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print source code while executing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S $ZSTEP=&amp;quot;W $ZPOS,?20,$T(@$ZPOS),! ZSTEP INTO&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can combine these together, for example, to print all executed lines and stop when a variable changes. Here&#039;s how I did that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n oldio s oldio=$i u 0 b:($g(olddic)&#039;=$d(DIC(0)))  s olddic=$d(DIC(0)) zp @$zpos u oldio zstep into&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17494</id>
		<title>SHabiel Pages</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17494"/>
		<updated>2019-01-28T17:08:43Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
|&lt;br /&gt;
== RPMS ==&lt;br /&gt;
[[RPMS_Installation|RPMS Installation on Cache]]&lt;br /&gt;
&lt;br /&gt;
[[RPMS_PortInstallation_to_GTM|RPMS Port and Installation on GT.M]]&lt;br /&gt;
&lt;br /&gt;
== Pharmacy ==&lt;br /&gt;
[[Pharmacy_Inpatient_Setup| Pharmacy: Inpatient Pharmacy Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_AR/WS_Setup| Pharamcy: Ward Stock Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_CS_Setup| Pharmacy: Controlled Substances Package Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[KIDS_Drug_File| Pharmacy: KIDS Drug File]]&lt;br /&gt;
&lt;br /&gt;
[[Enter_A_Drug| Pharmacy: How to enter a drug in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[NDC_Rules| Pharmacy: NDC Rules etc.]]&lt;br /&gt;
&lt;br /&gt;
== Taskman ==&lt;br /&gt;
[[Taskman_Recurring_Tasks|Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Debugging_Taskman_Tasks|Debugging Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Taskman_Internals|Taskman Internals]]&lt;br /&gt;
&lt;br /&gt;
== Sys Admin ==&lt;br /&gt;
[[Adding_Users|Adding new Users to VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Transplant_Cleanup| Cleaning up a Transplanted RPMS or VISTA system]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_up_a_VISTA_Printer|Setting up a VISTA Printer]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_Up_Mailman_For_External_Email| Setting up Mailman for External Email]]&lt;br /&gt;
&lt;br /&gt;
[[Basic_GTM_Journaling|Basic GT.M Journaling Instructions]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Auto_Signon|VISTA Automatic Sign-on]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Set-up_Outline| VISTA Set-up starting from scratch]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_XWB_Broker_Troubleshooting| VISTA XWB Broker Troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_System_Management_Daily_or_Weekly_Tasks | VISTA System Management Daily or Weekly Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Set-up_Fileman_Browser_Device | Set up the Fileman Browser]]&lt;br /&gt;
&lt;br /&gt;
== Lab ==&lt;br /&gt;
[[Lab_Brief_Setup|Sam tries to set up Lab]]&lt;br /&gt;
&lt;br /&gt;
== CPRS ==&lt;br /&gt;
[[CPRS_Config:_Order_Checks| CPRS Configuration: Order Checks]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Notifications| CPRS Configuration: Notifications]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Turn_Off_HDR| Turn off Remote Data Order Checking]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_on_Wine| Running CPRS on Linux via Wine]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
[[Patient_Merge|Patient Merge Set-up and Use in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[TLS_Enable_VISTA_Service| TLS Enable a VISTA Service]]&lt;br /&gt;
&lt;br /&gt;
[[Fileman_Internals| Fileman Internals]]&lt;br /&gt;
&lt;br /&gt;
[[Dev_Copy| Copying devices from another environment]]&lt;br /&gt;
&lt;br /&gt;
[[MFS_list| Master File Server controlled files]]&lt;br /&gt;
&lt;br /&gt;
[[Terminal_Emulators | List of known issues with modern Terminal Emulators and VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Bulk_rename_routines | Bulk of rename of Routines using Command Line tools]]&lt;br /&gt;
&lt;br /&gt;
[[GNUParallel_load_and_compile_to_GTM | Use GNU Parallel to load and import a new database to GT.M]]&lt;br /&gt;
&lt;br /&gt;
[[Fancy_ZSTEP_GTM | Enhanced ZSTEP to detect variable changes or print code ]]&lt;br /&gt;
&lt;br /&gt;
[[VistA_Event_Drivers | Events Drivers in VistA]]&lt;br /&gt;
&lt;br /&gt;
== Mumps Classes ==&lt;br /&gt;
* [[Mumps_Class_1|Class 1]] (Intro, History and Features of M)&lt;br /&gt;
* [[Mumps_Class_2|Class 2]] (Structure of Language, variables, etc)&lt;br /&gt;
* [[Mumps_Class_3|Class 3]] (Operators)&lt;br /&gt;
* [[Mumps_Class_4|Class 4]] (Strings and String Functions ($A, $C, $TR, $L, $P, $E, $F)&lt;br /&gt;
* [[Mumps_Class_5|Class 5]] (String pattern matching operator (?), Read, Write Set)&lt;br /&gt;
* [[Mumps_Class_6|Class 6]] (Read, Write, Set, Kill)&lt;br /&gt;
* [[Mumps_Class_7|Class 7]] (Do, If, $Test)&lt;br /&gt;
* [[Mumps_Class_8|Class 8]] (For loop)&lt;br /&gt;
* [[Mumps_Class_9|Class 9]] (Routine Walkthrough; debugging with native GT.M and TMGIDE)&lt;br /&gt;
* [[Mumps_Class_10|Class 10]] (Routine Walkthrough; $Reference and naked global references&lt;br /&gt;
* [[Mumps_Class_11|Class 11]] (Stack, Symbol Table, effect of Do and Goto; New)&lt;br /&gt;
* [[Mumps_Class_12|Class 12]] (Extrinsic Functions; passing parameters)&lt;br /&gt;
* [[Mumps_Class_13|Class 13]] ($Order and $Data)&lt;br /&gt;
* [[Mumps_Class_14|Class 14]] ($Query, $QS and $QL)&lt;br /&gt;
* [[Mumps_Class_15|Class 15]] (Indirection, Xecute, $Get, $Text)&lt;br /&gt;
* [[Mumps_Class_16|Class 16]] ($Text, $Name, $Random, $Reverse etc)&lt;br /&gt;
* [[Mumps_Class_17|Class 17]] (Locks)&lt;br /&gt;
* [[Mumps_Class_18|Class 18]] (Devices: Files, Null, Terminal, TCP)&lt;br /&gt;
* [[Mumps_Class_19|Class 19]] (Devices: Pipe; using ^%ZIS)&lt;br /&gt;
* [[Mumps_Class_20|Class 20]] (Job command; Transactions in Mumps)&lt;br /&gt;
* [[Mumps_Class_21|Class 21]] (Error Processing in Mumps)&lt;br /&gt;
&lt;br /&gt;
== Fileman API Classes ==&lt;br /&gt;
* [[Fileman_API_Class_1|Class 1]] (Intro, ^DIR, ^DIC, ^%DT, ^%DTC, ^XLFDT)&lt;br /&gt;
* [[Fileman_API_Class_2|Class 2]] (EN^DDIOL, %RCR, EN1^DIP, ^DIE, ^DIK)&lt;br /&gt;
&lt;br /&gt;
== Student Projects ==&lt;br /&gt;
* [[VISTA_Class_Student_Projects | Projects suitable for students learning VISTA]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17493</id>
		<title>SHabiel Pages</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17493"/>
		<updated>2019-01-28T17:08:26Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
|&lt;br /&gt;
== RPMS ==&lt;br /&gt;
[[RPMS_Installation|RPMS Installation on Cache]]&lt;br /&gt;
&lt;br /&gt;
[[RPMS_PortInstallation_to_GTM|RPMS Port and Installation on GT.M]]&lt;br /&gt;
&lt;br /&gt;
== Pharmacy ==&lt;br /&gt;
[[Pharmacy_Inpatient_Setup| Pharmacy: Inpatient Pharmacy Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_AR/WS_Setup| Pharamcy: Ward Stock Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_CS_Setup| Pharmacy: Controlled Substances Package Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[KIDS_Drug_File| Pharmacy: KIDS Drug File]]&lt;br /&gt;
&lt;br /&gt;
[[Enter_A_Drug| Pharmacy: How to enter a drug in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[NDC_Rules| Pharmacy: NDC Rules etc.]]&lt;br /&gt;
&lt;br /&gt;
== Taskman ==&lt;br /&gt;
[[Taskman_Recurring_Tasks|Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Debugging_Taskman_Tasks|Debugging Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Taskman_Internals|Taskman Internals]]&lt;br /&gt;
&lt;br /&gt;
== Sys Admin ==&lt;br /&gt;
[[Adding_Users|Adding new Users to VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Transplant_Cleanup| Cleaning up a Transplanted RPMS or VISTA system]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_up_a_VISTA_Printer|Setting up a VISTA Printer]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_Up_Mailman_For_External_Email| Setting up Mailman for External Email]]&lt;br /&gt;
&lt;br /&gt;
[[Basic_GTM_Journaling|Basic GT.M Journaling Instructions]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Auto_Signon|VISTA Automatic Sign-on]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Set-up_Outline| VISTA Set-up starting from scratch]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_XWB_Broker_Troubleshooting| VISTA XWB Broker Troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_System_Management_Daily_or_Weekly_Tasks | VISTA System Management Daily or Weekly Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Set-up_Fileman_Browser_Device | Set up the Fileman Browser]]&lt;br /&gt;
&lt;br /&gt;
== Lab ==&lt;br /&gt;
[[Lab_Brief_Setup|Sam tries to set up Lab]]&lt;br /&gt;
&lt;br /&gt;
== CPRS ==&lt;br /&gt;
[[CPRS_Config:_Order_Checks| CPRS Configuration: Order Checks]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Notifications| CPRS Configuration: Notifications]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Turn_Off_HDR| Turn off Remote Data Order Checking]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_on_Wine| Running CPRS on Linux via Wine]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
[[Patient_Merge|Patient Merge Set-up and Use in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[TLS_Enable_VISTA_Service| TLS Enable a VISTA Service]]&lt;br /&gt;
&lt;br /&gt;
[[Fileman_Internals| Fileman Internals]]&lt;br /&gt;
&lt;br /&gt;
[[Dev_Copy| Copying devices from another environment]]&lt;br /&gt;
&lt;br /&gt;
[[MFS_list| Master File Server controlled files]]&lt;br /&gt;
&lt;br /&gt;
[[Terminal_Emulators | List of known issues with modern Terminal Emulators and VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Bulk_rename_routines | Bulk of rename of Routines using Command Line tools]]&lt;br /&gt;
&lt;br /&gt;
[[GNUParallel_load_and_compile_to_GTM | Use GNU Parallel to load and import a new database to GT.M]]&lt;br /&gt;
&lt;br /&gt;
[[Fancy_ZSTEP_GTM | Enhanced ZSTEP to detect variable changes or print code ]&lt;br /&gt;
&lt;br /&gt;
[[VistA_Event_Drivers | Events Drivers in VistA]]&lt;br /&gt;
&lt;br /&gt;
== Mumps Classes ==&lt;br /&gt;
* [[Mumps_Class_1|Class 1]] (Intro, History and Features of M)&lt;br /&gt;
* [[Mumps_Class_2|Class 2]] (Structure of Language, variables, etc)&lt;br /&gt;
* [[Mumps_Class_3|Class 3]] (Operators)&lt;br /&gt;
* [[Mumps_Class_4|Class 4]] (Strings and String Functions ($A, $C, $TR, $L, $P, $E, $F)&lt;br /&gt;
* [[Mumps_Class_5|Class 5]] (String pattern matching operator (?), Read, Write Set)&lt;br /&gt;
* [[Mumps_Class_6|Class 6]] (Read, Write, Set, Kill)&lt;br /&gt;
* [[Mumps_Class_7|Class 7]] (Do, If, $Test)&lt;br /&gt;
* [[Mumps_Class_8|Class 8]] (For loop)&lt;br /&gt;
* [[Mumps_Class_9|Class 9]] (Routine Walkthrough; debugging with native GT.M and TMGIDE)&lt;br /&gt;
* [[Mumps_Class_10|Class 10]] (Routine Walkthrough; $Reference and naked global references&lt;br /&gt;
* [[Mumps_Class_11|Class 11]] (Stack, Symbol Table, effect of Do and Goto; New)&lt;br /&gt;
* [[Mumps_Class_12|Class 12]] (Extrinsic Functions; passing parameters)&lt;br /&gt;
* [[Mumps_Class_13|Class 13]] ($Order and $Data)&lt;br /&gt;
* [[Mumps_Class_14|Class 14]] ($Query, $QS and $QL)&lt;br /&gt;
* [[Mumps_Class_15|Class 15]] (Indirection, Xecute, $Get, $Text)&lt;br /&gt;
* [[Mumps_Class_16|Class 16]] ($Text, $Name, $Random, $Reverse etc)&lt;br /&gt;
* [[Mumps_Class_17|Class 17]] (Locks)&lt;br /&gt;
* [[Mumps_Class_18|Class 18]] (Devices: Files, Null, Terminal, TCP)&lt;br /&gt;
* [[Mumps_Class_19|Class 19]] (Devices: Pipe; using ^%ZIS)&lt;br /&gt;
* [[Mumps_Class_20|Class 20]] (Job command; Transactions in Mumps)&lt;br /&gt;
* [[Mumps_Class_21|Class 21]] (Error Processing in Mumps)&lt;br /&gt;
&lt;br /&gt;
== Fileman API Classes ==&lt;br /&gt;
* [[Fileman_API_Class_1|Class 1]] (Intro, ^DIR, ^DIC, ^%DT, ^%DTC, ^XLFDT)&lt;br /&gt;
* [[Fileman_API_Class_2|Class 2]] (EN^DDIOL, %RCR, EN1^DIP, ^DIE, ^DIK)&lt;br /&gt;
&lt;br /&gt;
== Student Projects ==&lt;br /&gt;
* [[VISTA_Class_Student_Projects | Projects suitable for students learning VISTA]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VistA_Event_Drivers&amp;diff=17492</id>
		<title>VistA Event Drivers</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VistA_Event_Drivers&amp;diff=17492"/>
		<updated>2019-01-18T22:13:58Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: Created page with &amp;quot;{| ! PROTOCOL || Description |- | DG FIELD MONITOR || DG Field Monitor |- | DGPM MOVEMENT EVENTS || MOVEMENT EVENTS v 5.0 |- | GMPL EVENT || Problem List Update Event |- | GMR...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
! PROTOCOL || Description&lt;br /&gt;
|-&lt;br /&gt;
| DG FIELD MONITOR || DG Field Monitor&lt;br /&gt;
|-&lt;br /&gt;
| DGPM MOVEMENT EVENTS || MOVEMENT EVENTS v 5.0&lt;br /&gt;
|-&lt;br /&gt;
| GMPL EVENT || Problem List Update Event&lt;br /&gt;
|-&lt;br /&gt;
| GMRA ENTERED IN ERROR || Reaction Data Entered in Error&lt;br /&gt;
|-&lt;br /&gt;
| GMRA SIGN-OFF ON DATA || Sign-off on Reaction Data&lt;br /&gt;
|-&lt;br /&gt;
| GMRC EVSEND OR || Consults event sent to OE/RR&lt;br /&gt;
|-&lt;br /&gt;
| IBCN NEW INSURANCE EVENTS || IB New Insurance Event Driver&lt;br /&gt;
|-&lt;br /&gt;
| LR7O CH EVSEND OR || LAB =&amp;gt; OE/RR ORDER MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND FH || OE/RR =&amp;gt; DIET MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND GMRC || OE/RR =&amp;gt; CONSULTS MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND LRCH || OE/RR =&amp;gt; LAB MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND ORG || OE/RR =&amp;gt; GENERIC MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND PS || OE/RR =&amp;gt; PHARMACY MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND RA || OE/RR =&amp;gt; RAD/NM MESSAGE EVENT&lt;br /&gt;
|-&lt;br /&gt;
| OR EVSEND VPR || OE/RR =&amp;gt; VPR MESSAGE&lt;br /&gt;
|-&lt;br /&gt;
| PS EVSEND OR || Send Pharmacy orders to CPRS.&lt;br /&gt;
|-&lt;br /&gt;
| PXK VISIT DATA EVENT || VISIT RELATED DATA&lt;br /&gt;
|-&lt;br /&gt;
| RA EVSEND OR || Radiology event sent to OE/RR&lt;br /&gt;
|-&lt;br /&gt;
| SCMC PATIENT TEAM CHANGES || PCMM Patient Team Update Event Driver&lt;br /&gt;
|-&lt;br /&gt;
| SCMC PATIENT TEAM POSITION CHANGES || PCMM Patient Team Position Update Event Driver&lt;br /&gt;
|-&lt;br /&gt;
| SDAM APPOINTMENT EVENTS || Appointment Event Driver&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17491</id>
		<title>SHabiel Pages</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17491"/>
		<updated>2019-01-18T22:00:19Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
|&lt;br /&gt;
== RPMS ==&lt;br /&gt;
[[RPMS_Installation|RPMS Installation on Cache]]&lt;br /&gt;
&lt;br /&gt;
[[RPMS_PortInstallation_to_GTM|RPMS Port and Installation on GT.M]]&lt;br /&gt;
&lt;br /&gt;
== Pharmacy ==&lt;br /&gt;
[[Pharmacy_Inpatient_Setup| Pharmacy: Inpatient Pharmacy Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_AR/WS_Setup| Pharamcy: Ward Stock Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_CS_Setup| Pharmacy: Controlled Substances Package Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[KIDS_Drug_File| Pharmacy: KIDS Drug File]]&lt;br /&gt;
&lt;br /&gt;
[[Enter_A_Drug| Pharmacy: How to enter a drug in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[NDC_Rules| Pharmacy: NDC Rules etc.]]&lt;br /&gt;
&lt;br /&gt;
== Taskman ==&lt;br /&gt;
[[Taskman_Recurring_Tasks|Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Debugging_Taskman_Tasks|Debugging Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Taskman_Internals|Taskman Internals]]&lt;br /&gt;
&lt;br /&gt;
== Sys Admin ==&lt;br /&gt;
[[Adding_Users|Adding new Users to VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Transplant_Cleanup| Cleaning up a Transplanted RPMS or VISTA system]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_up_a_VISTA_Printer|Setting up a VISTA Printer]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_Up_Mailman_For_External_Email| Setting up Mailman for External Email]]&lt;br /&gt;
&lt;br /&gt;
[[Basic_GTM_Journaling|Basic GT.M Journaling Instructions]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Auto_Signon|VISTA Automatic Sign-on]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Set-up_Outline| VISTA Set-up starting from scratch]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_XWB_Broker_Troubleshooting| VISTA XWB Broker Troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_System_Management_Daily_or_Weekly_Tasks | VISTA System Management Daily or Weekly Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Set-up_Fileman_Browser_Device | Set up the Fileman Browser]]&lt;br /&gt;
&lt;br /&gt;
== Lab ==&lt;br /&gt;
[[Lab_Brief_Setup|Sam tries to set up Lab]]&lt;br /&gt;
&lt;br /&gt;
== CPRS ==&lt;br /&gt;
[[CPRS_Config:_Order_Checks| CPRS Configuration: Order Checks]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Notifications| CPRS Configuration: Notifications]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Turn_Off_HDR| Turn off Remote Data Order Checking]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_on_Wine| Running CPRS on Linux via Wine]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
[[Patient_Merge|Patient Merge Set-up and Use in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[TLS_Enable_VISTA_Service| TLS Enable a VISTA Service]]&lt;br /&gt;
&lt;br /&gt;
[[Fileman_Internals| Fileman Internals]]&lt;br /&gt;
&lt;br /&gt;
[[Dev_Copy| Copying devices from another environment]]&lt;br /&gt;
&lt;br /&gt;
[[MFS_list| Master File Server controlled files]]&lt;br /&gt;
&lt;br /&gt;
[[Terminal_Emulators | List of known issues with modern Terminal Emulators and VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Bulk_rename_routines | Bulk of rename of Routines using Command Line tools]]&lt;br /&gt;
&lt;br /&gt;
[[GNUParallel_load_and_compile_to_GTM | Use GNU Parallel to load and import a new database to GT.M]]&lt;br /&gt;
&lt;br /&gt;
[[VistA_Event_Drivers | Events Drivers in VistA]]&lt;br /&gt;
&lt;br /&gt;
== Mumps Classes ==&lt;br /&gt;
* [[Mumps_Class_1|Class 1]] (Intro, History and Features of M)&lt;br /&gt;
* [[Mumps_Class_2|Class 2]] (Structure of Language, variables, etc)&lt;br /&gt;
* [[Mumps_Class_3|Class 3]] (Operators)&lt;br /&gt;
* [[Mumps_Class_4|Class 4]] (Strings and String Functions ($A, $C, $TR, $L, $P, $E, $F)&lt;br /&gt;
* [[Mumps_Class_5|Class 5]] (String pattern matching operator (?), Read, Write Set)&lt;br /&gt;
* [[Mumps_Class_6|Class 6]] (Read, Write, Set, Kill)&lt;br /&gt;
* [[Mumps_Class_7|Class 7]] (Do, If, $Test)&lt;br /&gt;
* [[Mumps_Class_8|Class 8]] (For loop)&lt;br /&gt;
* [[Mumps_Class_9|Class 9]] (Routine Walkthrough; debugging with native GT.M and TMGIDE)&lt;br /&gt;
* [[Mumps_Class_10|Class 10]] (Routine Walkthrough; $Reference and naked global references&lt;br /&gt;
* [[Mumps_Class_11|Class 11]] (Stack, Symbol Table, effect of Do and Goto; New)&lt;br /&gt;
* [[Mumps_Class_12|Class 12]] (Extrinsic Functions; passing parameters)&lt;br /&gt;
* [[Mumps_Class_13|Class 13]] ($Order and $Data)&lt;br /&gt;
* [[Mumps_Class_14|Class 14]] ($Query, $QS and $QL)&lt;br /&gt;
* [[Mumps_Class_15|Class 15]] (Indirection, Xecute, $Get, $Text)&lt;br /&gt;
* [[Mumps_Class_16|Class 16]] ($Text, $Name, $Random, $Reverse etc)&lt;br /&gt;
* [[Mumps_Class_17|Class 17]] (Locks)&lt;br /&gt;
* [[Mumps_Class_18|Class 18]] (Devices: Files, Null, Terminal, TCP)&lt;br /&gt;
* [[Mumps_Class_19|Class 19]] (Devices: Pipe; using ^%ZIS)&lt;br /&gt;
* [[Mumps_Class_20|Class 20]] (Job command; Transactions in Mumps)&lt;br /&gt;
* [[Mumps_Class_21|Class 21]] (Error Processing in Mumps)&lt;br /&gt;
&lt;br /&gt;
== Fileman API Classes ==&lt;br /&gt;
* [[Fileman_API_Class_1|Class 1]] (Intro, ^DIR, ^DIC, ^%DT, ^%DTC, ^XLFDT)&lt;br /&gt;
* [[Fileman_API_Class_2|Class 2]] (EN^DDIOL, %RCR, EN1^DIP, ^DIE, ^DIK)&lt;br /&gt;
&lt;br /&gt;
== Student Projects ==&lt;br /&gt;
* [[VISTA_Class_Student_Projects | Projects suitable for students learning VISTA]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=MFS_list&amp;diff=17490</id>
		<title>MFS list</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=MFS_list&amp;diff=17490"/>
		<updated>2019-01-11T14:06:01Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Updated based on a spreadsheet given to us by the VA. This list is what actually gets updated, not what has MFS parameters. Several files have MFS parameters but the work to updated them via MFS did not continue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
4.009&lt;br /&gt;
10.99&lt;br /&gt;
11.99&lt;br /&gt;
13.99&lt;br /&gt;
50.60699&lt;br /&gt;
66.3&lt;br /&gt;
71.99&lt;br /&gt;
95.3&lt;br /&gt;
100.01&lt;br /&gt;
100.02&lt;br /&gt;
120.51&lt;br /&gt;
120.52&lt;br /&gt;
120.53&lt;br /&gt;
120.82&lt;br /&gt;
120.83&lt;br /&gt;
355.99&lt;br /&gt;
920&lt;br /&gt;
920.1&lt;br /&gt;
920.2&lt;br /&gt;
920.3&lt;br /&gt;
920.4&lt;br /&gt;
920.5&lt;br /&gt;
7118.11&lt;br /&gt;
8925.6&lt;br /&gt;
8926.1&lt;br /&gt;
8926.2&lt;br /&gt;
8926.3&lt;br /&gt;
8926.4&lt;br /&gt;
8926.5&lt;br /&gt;
8926.6&lt;br /&gt;
8932.1&lt;br /&gt;
8985.1&lt;br /&gt;
9999999.04&lt;br /&gt;
9999999.14&lt;br /&gt;
9999999.28&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Adding_Users&amp;diff=17465</id>
		<title>Adding Users</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Adding_Users&amp;diff=17465"/>
		<updated>2018-05-20T01:23:33Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Required Data Elements for a Functional User */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What does the person adding a new user need? ==&lt;br /&gt;
* Access to Menu Option &#039;&#039;&#039;XUSERNEW&#039;&#039;&#039;&lt;br /&gt;
* Key &#039;&#039;&#039;XUMGR&#039;&#039;&#039; or delegated keys and menus.&lt;br /&gt;
* Key &#039;&#039;&#039;XUSPF200&#039;&#039;&#039; (optional) to not be required to enter SSNs.&lt;br /&gt;
&lt;br /&gt;
Access to XUSERNEW is typically done through EVE &amp;gt; XUSER (User Management). If you have XUMGR, you can give any keys or menus. If not, you can only give keys and menus delegated to you (I don&#039;t cover delegation here).&lt;br /&gt;
&lt;br /&gt;
== Required Data Elements for a Functional User ==&lt;br /&gt;
Adding a user is rather confusing due to the number of different items you can fill when most of them is optional.&lt;br /&gt;
&lt;br /&gt;
(Pre-page 1)&lt;br /&gt;
* Name&lt;br /&gt;
[[File:Vista-add-user1.png]]&lt;br /&gt;
&lt;br /&gt;
(Page 1)&lt;br /&gt;
* Primary Menu Option (or user can&#039;t log in)&lt;br /&gt;
* Access Code (say Y to the &amp;quot;Want to edit option&amp;quot; and you will be asked to enter it twice)&lt;br /&gt;
* Verify Code (ditto)&lt;br /&gt;
* Service/Section (any will do)&lt;br /&gt;
[[File:Vista-add-user2.png]]&lt;br /&gt;
&lt;br /&gt;
== CPRS Users ==&lt;br /&gt;
You need to fill in the following for CPRS users.&lt;br /&gt;
&lt;br /&gt;
(Page 1)&lt;br /&gt;
* Access to OR CPRS GUI CHART either through a  primary option or alone as a secondary option&lt;br /&gt;
(Page 3)&lt;br /&gt;
* Person Class with Effective Date (especially for Reminders to work)&lt;br /&gt;
(Page 4)&lt;br /&gt;
* Restrict Patient Selection&lt;br /&gt;
* CPRS Tab Access with Effective Date&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers get PROVIDER key as well as an ordering key (ORES or ORELSE). Physicians/other providers get ORES to be able to order meds; Nurses and Pharmacists get ORELSE to be able to act on Orders in CPRS and also to be able to place orders on behalf of ORES holding providers.&lt;br /&gt;
&lt;br /&gt;
Physicians ordering Meds from CPRS need to have &#039;Authorized to write med orders&#039; field 53.1 in file 200 (NEW PERSON) set to YES. To order controlled substances, provider must have either a DEA# in file 200 or a VA # in file 200 with an Institutional DEA in the Kernel System Parameters file (8989.3). VistA-Config users click on a user then the Advanced tab, go to field 53.1 and set it to YES. &lt;br /&gt;
&lt;br /&gt;
For users to inherit parameters properly for CPRS, and for optional TIU functions to work, they need to to be added to a TIU User Class. This is done through the USR CLASS MANAGEMENT MENU.&lt;br /&gt;
&lt;br /&gt;
== Screenshot ==&lt;br /&gt;
[[Image:Screenshot-poc-moh@sam-desktop-_-opt-worldvista-poc-moh.png||Adding a new user]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=File:Vista-add-user2.png&amp;diff=17464</id>
		<title>File:Vista-add-user2.png</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=File:Vista-add-user2.png&amp;diff=17464"/>
		<updated>2018-05-20T01:21:40Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Adding_Users&amp;diff=17463</id>
		<title>Adding Users</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Adding_Users&amp;diff=17463"/>
		<updated>2018-05-20T01:20:46Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Required Data Elements for a Functional User */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What does the person adding a new user need? ==&lt;br /&gt;
* Access to Menu Option &#039;&#039;&#039;XUSERNEW&#039;&#039;&#039;&lt;br /&gt;
* Key &#039;&#039;&#039;XUMGR&#039;&#039;&#039; or delegated keys and menus.&lt;br /&gt;
* Key &#039;&#039;&#039;XUSPF200&#039;&#039;&#039; (optional) to not be required to enter SSNs.&lt;br /&gt;
&lt;br /&gt;
Access to XUSERNEW is typically done through EVE &amp;gt; XUSER (User Management). If you have XUMGR, you can give any keys or menus. If not, you can only give keys and menus delegated to you (I don&#039;t cover delegation here).&lt;br /&gt;
&lt;br /&gt;
== Required Data Elements for a Functional User ==&lt;br /&gt;
Adding a user is rather confusing due to the number of different items you can fill when most of them is optional.&lt;br /&gt;
&lt;br /&gt;
(Pre-page 1)&lt;br /&gt;
* Name&lt;br /&gt;
[[File:Vista-add-user1.png]]&lt;br /&gt;
(Page 1)&lt;br /&gt;
* Primary Menu Option (or user can&#039;t log in)&lt;br /&gt;
* Access Code&lt;br /&gt;
* Verify Code&lt;br /&gt;
* Service/Section&lt;br /&gt;
&lt;br /&gt;
== CPRS Users ==&lt;br /&gt;
You need to fill in the following for CPRS users.&lt;br /&gt;
&lt;br /&gt;
(Page 1)&lt;br /&gt;
* Access to OR CPRS GUI CHART either through a  primary option or alone as a secondary option&lt;br /&gt;
(Page 3)&lt;br /&gt;
* Person Class with Effective Date (especially for Reminders to work)&lt;br /&gt;
(Page 4)&lt;br /&gt;
* Restrict Patient Selection&lt;br /&gt;
* CPRS Tab Access with Effective Date&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Providers get PROVIDER key as well as an ordering key (ORES or ORELSE). Physicians/other providers get ORES to be able to order meds; Nurses and Pharmacists get ORELSE to be able to act on Orders in CPRS and also to be able to place orders on behalf of ORES holding providers.&lt;br /&gt;
&lt;br /&gt;
Physicians ordering Meds from CPRS need to have &#039;Authorized to write med orders&#039; field 53.1 in file 200 (NEW PERSON) set to YES. To order controlled substances, provider must have either a DEA# in file 200 or a VA # in file 200 with an Institutional DEA in the Kernel System Parameters file (8989.3). VistA-Config users click on a user then the Advanced tab, go to field 53.1 and set it to YES. &lt;br /&gt;
&lt;br /&gt;
For users to inherit parameters properly for CPRS, and for optional TIU functions to work, they need to to be added to a TIU User Class. This is done through the USR CLASS MANAGEMENT MENU.&lt;br /&gt;
&lt;br /&gt;
== Screenshot ==&lt;br /&gt;
[[Image:Screenshot-poc-moh@sam-desktop-_-opt-worldvista-poc-moh.png||Adding a new user]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=File:Vista-add-user1.png&amp;diff=17462</id>
		<title>File:Vista-add-user1.png</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=File:Vista-add-user1.png&amp;diff=17462"/>
		<updated>2018-05-20T01:16:40Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: VistA add User part 1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VistA add User part 1&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=CPRS_on_Wine&amp;diff=17414</id>
		<title>CPRS on Wine</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=CPRS_on_Wine&amp;diff=17414"/>
		<updated>2017-08-30T21:19:15Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can run CPRS on Wine.&lt;br /&gt;
&lt;br /&gt;
You first need to install Wine &lt;br /&gt;
&lt;br /&gt;
Then run CPRS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wine CPRSChart.exe s=server_address p=port_number&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=GNUParallel_load_and_compile_to_GTM&amp;diff=17230</id>
		<title>GNUParallel load and compile to GTM</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=GNUParallel_load_and_compile_to_GTM&amp;diff=17230"/>
		<updated>2017-05-25T15:51:14Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: Created page with &amp;quot;[GNU Parallel https://www.gnu.org/software/parallel/] is used in the bio-informatics world to spread processing of data over several CPUs, on the same machine, or on spread ou...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[GNU Parallel https://www.gnu.org/software/parallel/] is used in the bio-informatics world to spread processing of data over several CPUs, on the same machine, or on spread out machines using ssh.&lt;br /&gt;
&lt;br /&gt;
I am using it here to compile routines and load globals.&lt;br /&gt;
&lt;br /&gt;
To load routines (I got 44s vs 58s on 8 cpu machine):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd o&lt;br /&gt;
$ ls ../r/*.m | parallel mumps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load globals (i got 60s vs 149s on 8 cpu machine):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find vxVistA-M-master/ -name &#039;*.zwr&#039; -print0 | parallel -q --null mupip load \&amp;quot;{}\&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17229</id>
		<title>SHabiel Pages</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=SHabiel_Pages&amp;diff=17229"/>
		<updated>2017-05-25T15:44:08Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|&lt;br /&gt;
|&lt;br /&gt;
== RPMS ==&lt;br /&gt;
[[RPMS_Installation|RPMS Installation on Cache]]&lt;br /&gt;
&lt;br /&gt;
[[RPMS_PortInstallation_to_GTM|RPMS Port and Installation on GT.M]]&lt;br /&gt;
&lt;br /&gt;
== Pharmacy ==&lt;br /&gt;
[[Pharmacy_Inpatient_Setup| Pharmacy: Inpatient Pharmacy Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_AR/WS_Setup| Pharamcy: Ward Stock Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[Pharmacy_CS_Setup| Pharmacy: Controlled Substances Package Set-up]]&lt;br /&gt;
&lt;br /&gt;
[[KIDS_Drug_File| Pharmacy: KIDS Drug File]]&lt;br /&gt;
&lt;br /&gt;
[[Enter_A_Drug| Pharmacy: How to enter a drug in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[NDC_Rules| Pharmacy: NDC Rules etc.]]&lt;br /&gt;
&lt;br /&gt;
== Taskman ==&lt;br /&gt;
[[Taskman_Recurring_Tasks|Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Debugging_Taskman_Tasks|Debugging Taskman Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Taskman_Internals|Taskman Internals]]&lt;br /&gt;
&lt;br /&gt;
== Sys Admin ==&lt;br /&gt;
[[Adding_Users|Adding new Users to VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Transplant_Cleanup| Cleaning up a Transplanted RPMS or VISTA system]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_up_a_VISTA_Printer|Setting up a VISTA Printer]]&lt;br /&gt;
&lt;br /&gt;
[[Setting_Up_Mailman_For_External_Email| Setting up Mailman for External Email]]&lt;br /&gt;
&lt;br /&gt;
[[Basic_GTM_Journaling|Basic GT.M Journaling Instructions]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Auto_Signon|VISTA Automatic Sign-on]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_Set-up_Outline| VISTA Set-up starting from scratch]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_XWB_Broker_Troubleshooting| VISTA XWB Broker Troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
[[VISTA_System_Management_Daily_or_Weekly_Tasks | VISTA System Management Daily or Weekly Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Set-up_Fileman_Browser_Device | Set up the Fileman Browser]]&lt;br /&gt;
&lt;br /&gt;
== Lab ==&lt;br /&gt;
[[Lab_Brief_Setup|Sam tries to set up Lab]]&lt;br /&gt;
&lt;br /&gt;
== CPRS ==&lt;br /&gt;
[[CPRS_Config:_Order_Checks| CPRS Configuration: Order Checks]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Notifications| CPRS Configuration: Notifications]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_Config:_Turn_Off_HDR| Turn off Remote Data Order Checking]]&lt;br /&gt;
&lt;br /&gt;
[[CPRS_on_Wine| Running CPRS on Linux via Wine]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
[[Patient_Merge|Patient Merge Set-up and Use in VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[TLS_Enable_VISTA_Service| TLS Enable a VISTA Service]]&lt;br /&gt;
&lt;br /&gt;
[[Fileman_Internals| Fileman Internals]]&lt;br /&gt;
&lt;br /&gt;
[[Dev_Copy| Copying devices from another environment]]&lt;br /&gt;
&lt;br /&gt;
[[MFS_list| Master File Server controlled files]]&lt;br /&gt;
&lt;br /&gt;
[[Terminal_Emulators | List of known issues with modern Terminal Emulators and VISTA]]&lt;br /&gt;
&lt;br /&gt;
[[Bulk_rename_routines | Bulk of rename of Routines using Command Line tools]]&lt;br /&gt;
&lt;br /&gt;
[[GNUParallel_load_and_compile_to_GTM | Use GNU Parallel to load and import a new database to GT.M]]&lt;br /&gt;
&lt;br /&gt;
== Mumps Classes ==&lt;br /&gt;
* [[Mumps_Class_1|Class 1]] (Intro, History and Features of M)&lt;br /&gt;
* [[Mumps_Class_2|Class 2]] (Structure of Language, variables, etc)&lt;br /&gt;
* [[Mumps_Class_3|Class 3]] (Operators)&lt;br /&gt;
* [[Mumps_Class_4|Class 4]] (Strings and String Functions ($A, $C, $TR, $L, $P, $E, $F)&lt;br /&gt;
* [[Mumps_Class_5|Class 5]] (String pattern matching operator (?), Read, Write Set)&lt;br /&gt;
* [[Mumps_Class_6|Class 6]] (Read, Write, Set, Kill)&lt;br /&gt;
* [[Mumps_Class_7|Class 7]] (Do, If, $Test)&lt;br /&gt;
* [[Mumps_Class_8|Class 8]] (For loop)&lt;br /&gt;
* [[Mumps_Class_9|Class 9]] (Routine Walkthrough; debugging with native GT.M and TMGIDE)&lt;br /&gt;
* [[Mumps_Class_10|Class 10]] (Routine Walkthrough; $Reference and naked global references&lt;br /&gt;
* [[Mumps_Class_11|Class 11]] (Stack, Symbol Table, effect of Do and Goto; New)&lt;br /&gt;
* [[Mumps_Class_12|Class 12]] (Extrinsic Functions; passing parameters)&lt;br /&gt;
* [[Mumps_Class_13|Class 13]] ($Order and $Data)&lt;br /&gt;
* [[Mumps_Class_14|Class 14]] ($Query, $QS and $QL)&lt;br /&gt;
* [[Mumps_Class_15|Class 15]] (Indirection, Xecute, $Get, $Text)&lt;br /&gt;
* [[Mumps_Class_16|Class 16]] ($Text, $Name, $Random, $Reverse etc)&lt;br /&gt;
* [[Mumps_Class_17|Class 17]] (Locks)&lt;br /&gt;
* [[Mumps_Class_18|Class 18]] (Devices: Files, Null, Terminal, TCP)&lt;br /&gt;
* [[Mumps_Class_19|Class 19]] (Devices: Pipe; using ^%ZIS)&lt;br /&gt;
* [[Mumps_Class_20|Class 20]] (Job command; Transactions in Mumps)&lt;br /&gt;
* [[Mumps_Class_21|Class 21]] (Error Processing in Mumps)&lt;br /&gt;
&lt;br /&gt;
== Fileman API Classes ==&lt;br /&gt;
* [[Fileman_API_Class_1|Class 1]] (Intro, ^DIR, ^DIC, ^%DT, ^%DTC, ^XLFDT)&lt;br /&gt;
* [[Fileman_API_Class_2|Class 2]] (EN^DDIOL, %RCR, EN1^DIP, ^DIE, ^DIK)&lt;br /&gt;
&lt;br /&gt;
== Student Projects ==&lt;br /&gt;
* [[VISTA_Class_Student_Projects | Projects suitable for students learning VISTA]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17221</id>
		<title>Setting up a VISTA Printer</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17221"/>
		<updated>2016-12-09T18:01:21Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Setting Up a Printer in VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Programming VistA Issues]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This is an updated page. See [[Setting_up_a_Linux_Printer_Old|this page]] for old content.&lt;br /&gt;
&lt;br /&gt;
== Setting Up a Printer in VISTA ==&lt;br /&gt;
In order to set-up a printer in VISTA, there are three steps:&lt;br /&gt;
&lt;br /&gt;
* Add printer to CUPS or to Windows Printer list. The printers may be on remote servers, as long as the VISTA machine can access them.&lt;br /&gt;
* In VISTA, you need to create an entry that represents the printer formatting characteristics in the terminal type file (#3.2)&lt;br /&gt;
* Then you need to create an entry in the device file (#3.5) that corresponds to the printer&lt;br /&gt;
&lt;br /&gt;
In practice, you don&#039;t need to do the second step because there are only about 5 commonly used subtypes in VISTA which you reuse.&lt;br /&gt;
&lt;br /&gt;
A Subtype is a file entry that contains the code to send to the printer, to open the printer, reset the printer, select the page size, adjust the margins, select the font etc.&lt;br /&gt;
&lt;br /&gt;
=== Subtypes ===&lt;br /&gt;
&lt;br /&gt;
Information about subtypes, including the most common subtypes, is listed [[VISTA_Printing_Printer_Subtypes|here]].&lt;br /&gt;
&lt;br /&gt;
=== Caché/Windows Printing ===&lt;br /&gt;
When you specify a printer name in $I, Caché/Windows sends raw input directly to the printer, bypassing the driver. This makes setting up a printer on Windows easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: BROTHER                           $I: |PRN|\\VXQA\HL2270DW&lt;br /&gt;
  LOCATION OF TERMINAL: QA              SUBTYPE: P-HP-LASER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, all you have to do is put the printer name after |PRN| in $I. You can specify local printers; or you can specify shared printers using a UNC path (as shown above).&lt;br /&gt;
&lt;br /&gt;
=== Caché/Linux Printing ===&lt;br /&gt;
You can use Pipes in Cache to print on Linux/Unix. Here&#039;s an operative example. Based on my experience, this is the best way to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM&#039;S PHARMACY PRINTER            $I: /usr/bin/lpr -PSAN_FL6 -l&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;QW&amp;quot;                 SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that there is a bug in DEVOK^%ZOSV (ZOSVONT) that prevents it from checking the device properly. This will show up if you misconfigure a device and then use it in Taskman. Short of fixing this, here is how to remove the bad prints from Taskman:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S (DEV,ZTIME,ZTSK)=&amp;quot;&amp;quot; F  S DEV=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV)) Q:DEV=&amp;quot;&amp;quot;  F  S ZTIME=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME)) Q:&#039;ZTIME  F  S ZTSK=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME,ZTSK)) Q:&#039;ZTSK  D DQ^%ZTLOAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the method developed but not adopted by the VA in patch [http://foia-vista.osehra.org/Patches_By_Application/XU-KERNEL/XU-8_SEQ-485_PAT-585.TXT XU*8.0*585]. After attempting to use this method in production, I would recommend against it, because a. CPRS and BCMA code is not configured to pick up PQ devices and b. %ZISC has issues with PQ devices. I have fixed both of these issues; but the code for this is not in VISTA yet.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample device that uses the XU*8.0*585 method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PRINTER_NAME                          $I: PRINTER_NAME&lt;br /&gt;
  PURGE OLD PRINT QUEUE FILES: YES      LOCATION OF TERMINAL: Cups Device&lt;br /&gt;
  SUBTYPE: P-HP-LTR-POR-C17L7-W128-NOFF TYPE: PRINT QUEUE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Caché IP Direct ===&lt;br /&gt;
Some cool way to do it, bypassing the operating system and talking directly to the printer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: ZEBRA                             $I: |TCP|101092252&lt;br /&gt;
  LOCATION OF TERMINAL: XXXX&lt;br /&gt;
  OPEN PARAMETERS: (&amp;quot;10.10.10.1&amp;quot;:9100:&amp;quot;+Q+C&amp;quot;):2&lt;br /&gt;
  SUBTYPE: P-ZEBRA                      TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GT.M/Linux Printing ===&lt;br /&gt;
Pipes again; just like Cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
NAME: PHAR-IP-DM                        $I: PHAR-IP-DM&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Dot-Matrix&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -l -P PHAR-IP-DM 2&amp;gt;/dev/null&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-EPSON-DM-P15-5L&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-LS                        $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Landscape&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P13-LS&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P12                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (PL)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: PL&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P12                TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P16                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (MAR)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: MAR&lt;br /&gt;
  SUBTYPE: P-HPLJ2-P16                  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How Does Printing from VISTA Work? ===&lt;br /&gt;
How does this work?&lt;br /&gt;
The way this works is that $I becomes the IO variable. The open&lt;br /&gt;
parameters tells VISTA how to open the device.&lt;br /&gt;
&lt;br /&gt;
Vista does this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S IO=[$I]&lt;br /&gt;
S param=[OPEN PARAMETERS]&lt;br /&gt;
O IO:param&lt;br /&gt;
U IO&lt;br /&gt;
Send Open Execute from Subtype&lt;br /&gt;
U IO(0)&lt;br /&gt;
Interact with user; open another job, etc...&lt;br /&gt;
U IO&lt;br /&gt;
write write write&lt;br /&gt;
Send Close Execute from Subtype&lt;br /&gt;
C IO&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No need to do pre-open and post-close executes on the device which dynamically changes IOs.&lt;br /&gt;
&lt;br /&gt;
=== Avoiding the Staircase Effect When Printing from GT.M/Caché on *Nix with Laser Printers ===&lt;br /&gt;
For an explanation of the Staircase effect, see this:&lt;br /&gt;
http://www.digitalissues.co.uk/html/os/unix/stair.html&lt;br /&gt;
&lt;br /&gt;
Basically, the new line doesn&#039;t include a carriage return, so our output just flows off the page. So when you print a 10 line document, you may only see one line, as the rest was printed outside of the margin.&lt;br /&gt;
&lt;br /&gt;
If you are sending raw output (lpr with the -l option) from VISTA to any PCL compatible printer (and VISTA by and large uses PCL for formatting plain text output), you need to add this to your open execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
W $C(27),&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells the PCL compatible printer to append a CR to each LF or FF.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you are asking CUPS to handle the formatting (lpr without the -l option), CUPS properly formats the line returns through a CUPS filter, so you don&#039;t have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Printing Topics ===&lt;br /&gt;
[[VISTA_Advanced_printing_topics|Advanced printing topics]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17211</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17211"/>
		<updated>2016-10-27T01:36:47Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Printing PDFs from VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do Computers Communicate with Printers, Software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters.&amp;quot; Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commercial label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and What It Really Sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations,&amp;quot; or &amp;quot;supported languages.&amp;quot; What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a Printer on the Network for the First Time ==&lt;br /&gt;
Nothing prevents you from using a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. Consult the printer manual to find out how to print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nothing in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting Up the Printer in the Operating System ==&lt;br /&gt;
After confirming the connection, you need to set up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting Up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]].&lt;br /&gt;
&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Caché, Caché steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line. For example,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U IO W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various Troubleshooting Topics -- How Fun! ==&lt;br /&gt;
There are various issues that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra Pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended that this be disabled. To disable the extra page, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a Single Line Prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not Aligned Horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off or restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is Not Dark Enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label Gets Cut Off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA Printed Labels are too Small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to change for Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Margin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example on Cache on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: GHOSTPCL PORTRAIT&lt;br /&gt;
  $I: /home/lxuser/bin/gpcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=/opt/HFS/shabiel/print_out.pdf -          &lt;br /&gt;
LOCATION OF TERMINAL: PDF to /opt/HFS&lt;br /&gt;
  OPEN COUNT: 8                         OPEN PARAMETERS: &amp;quot;qw&amp;quot;&lt;br /&gt;
  POST-CLOSE EXECUTE: N % S %=$ZF(-1,&amp;quot;sh -c &#039;mv /opt/HFS/shabiel/print_out{,`date -Iseconds | tr \: _`}.pdf&#039;&amp;quot;)          SUBTYPE: P-HPLASER-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the Ready Status of a Print Queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17195</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17195"/>
		<updated>2016-10-04T20:41:51Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Setting up a printer in VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters.&amp;quot; Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commercial label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations,&amp;quot; or &amp;quot;supported languages.&amp;quot; What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from using a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]].&lt;br /&gt;
&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17194</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17194"/>
		<updated>2016-10-04T20:40:44Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* VISTA and what it really sends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters.&amp;quot; Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commercial label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations,&amp;quot; or &amp;quot;supported languages.&amp;quot; What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from using a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
See [[Setting_Up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17193</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17193"/>
		<updated>2016-10-04T20:39:40Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Advanced Printing Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters.&amp;quot; Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commercial label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations;&amp;quot; or &amp;quot;supported languages.&amp;quot; What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from using a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
See [[Setting_Up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17192</id>
		<title>Setting up a VISTA Printer</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17192"/>
		<updated>2016-10-04T20:29:51Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Setting up a printer in VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Programming VistA Issues]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This is an updated page. See [[Setting_up_a_Linux_Printer_Old|this page]] for old content.&lt;br /&gt;
&lt;br /&gt;
== Setting Up a Printer in VISTA ==&lt;br /&gt;
In order to set-up a printer in VISTA, there are three steps:&lt;br /&gt;
&lt;br /&gt;
* Add printer to CUPS or to Windows Printer list. The printers may be on remote servers, as long as the VISTA machine can access them.&lt;br /&gt;
* In VISTA, you need to create an entry that represents the printer formatting characteristics in the terminal type file (#3.2)&lt;br /&gt;
* Then you need to create an entry in the device file (#3.5) that corresponds to the printer&lt;br /&gt;
&lt;br /&gt;
In practice, you don&#039;t need to do the second step because there are only about 5 commonly used subtypes in VISTA which you reuse.&lt;br /&gt;
&lt;br /&gt;
A Subtype is a file entry that contains the code to send to the printer, to open the printer, reset the printer, select the page size, adjust the margins, select the font etc.&lt;br /&gt;
&lt;br /&gt;
=== Subtypes ===&lt;br /&gt;
&lt;br /&gt;
Information about subtypes, including the most common subtypes, is listed [[VISTA_Printing_Printer_Subtypes|here]].&lt;br /&gt;
&lt;br /&gt;
=== Cache/Windows printing ===&lt;br /&gt;
When you specify a printer name in $I, Cache/Windows sends raw input directly to the printer, bypassing the driver. This makes setting up a printer on Windows easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: BROTHER                           $I: |PRN|\\VXQA\HL2270DW&lt;br /&gt;
  LOCATION OF TERMINAL: QA              SUBTYPE: P-HP-LASER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, all you have to do is put the printer name after |PRN| in $I. You can specify local printers; or you can specify shared printers using a UNC path (as shown above).&lt;br /&gt;
&lt;br /&gt;
=== Cache/Linux printing ===&lt;br /&gt;
You can use Pipes in Cache to print on Linux/Unix. Here&#039;s an operative example. Based on my experience, this is the best way to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM&#039;S PHARMACY PRINTER            $I: /usr/bin/lpr -PSAN_FL6 -l&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;QW&amp;quot;                 SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that there is a bug in DEVOK^%ZOSV (ZOSVONT) that prevents it from checking the device properly. This will show up if you misconfigure a device and then use it in Taskman. Short of fixing this, here is how to remove the bad prints from Taskman:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S (DEV,ZTIME,ZTSK)=&amp;quot;&amp;quot; F  S DEV=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV)) Q:DEV=&amp;quot;&amp;quot;  F  S ZTIME=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME)) Q:&#039;ZTIME  F  S ZTSK=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME,ZTSK)) Q:&#039;ZTSK  D DQ^%ZTLOAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the method developed but not adopted by the VA in patch [http://foia-vista.osehra.org/Patches_By_Application/XU-KERNEL/XU-8_SEQ-485_PAT-585.TXT XU*8.0*585]. After attempting to use this method in production, I would recommend against it, because a. CPRS and BCMA code is not configured to pick up PQ devices and b. %ZISC has issues with PQ devices. I have fixed both of these issues; but the code for this is not in VISTA yet.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample device that uses the XU*8.0*585 method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PRINTER_NAME                          $I: PRINTER_NAME&lt;br /&gt;
  PURGE OLD PRINT QUEUE FILES: YES      LOCATION OF TERMINAL: Cups Device&lt;br /&gt;
  SUBTYPE: P-HP-LTR-POR-C17L7-W128-NOFF TYPE: PRINT QUEUE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GT.M/Linux printing ===&lt;br /&gt;
Pipes again; just like Cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
NAME: PHAR-IP-DM                        $I: PHAR-IP-DM&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Dot-Matrix&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -l -P PHAR-IP-DM 2&amp;gt;/dev/null&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-EPSON-DM-P15-5L&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-LS                        $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Landscape&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P13-LS&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P12                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (PL)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: PL&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P12                TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P16                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (MAR)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: MAR&lt;br /&gt;
  SUBTYPE: P-HPLJ2-P16                  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How does printing from VISTA work? ===&lt;br /&gt;
How does this work?&lt;br /&gt;
The way this works is that $I becomes the IO variable. The open&lt;br /&gt;
parameters tells VISTA how to open the device.&lt;br /&gt;
&lt;br /&gt;
Vista does this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S IO=[$I]&lt;br /&gt;
S param=[OPEN PARAMETERS]&lt;br /&gt;
O IO:param&lt;br /&gt;
U IO&lt;br /&gt;
Send Open Execute from Subtype&lt;br /&gt;
U IO(0)&lt;br /&gt;
Interact with user; open another job, etc...&lt;br /&gt;
U IO&lt;br /&gt;
write write write&lt;br /&gt;
Send Close Execute from Subtype&lt;br /&gt;
C IO&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No need to do pre-open and post-close executes on the device which dynamically changes IOs.&lt;br /&gt;
&lt;br /&gt;
=== Avoiding the Staircase effect when printing from GT.M/Cache on *Nix with Laser Printers ===&lt;br /&gt;
For an explanation of the Staircase effect, see this:&lt;br /&gt;
http://www.digitalissues.co.uk/html/os/unix/stair.html&lt;br /&gt;
&lt;br /&gt;
Basically, the new line doesn&#039;t include a carriage return, so our output just flows off the page. So when you print a 10 line document, you may only see one line, as the rest was printed outside of the margin.&lt;br /&gt;
&lt;br /&gt;
If you are sending raw output (lpr with the -l option) from VISTA to any PCL compatible printer (and VISTA by and large uses PCL for formatting plain text output), you need to add this to your open execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
W $C(27),&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells the PCL compatible printer to append a CR to each LF or FF.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you are asking Cups to handle the formatting (lpr without the -l option), Cups properly formats the line returns through a Cups filter, so you don&#039;t have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Advanced printing topics ===&lt;br /&gt;
[[VISTA_Advanced_printing_topics|Advanced printing topics]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17191</id>
		<title>Setting up a VISTA Printer</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17191"/>
		<updated>2016-10-04T20:26:53Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Avoiding the Staircase effect when printing from GT.M/Cache on *Nix with Laser Printers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Programming VistA Issues]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This is an updated page. See [[Setting_up_a_Linux_Printer_Old|this page]] for old content.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
In order to set-up a printer in VISTA, there are three steps:&lt;br /&gt;
&lt;br /&gt;
* Add printer to CUPS or to Windows Printer list. The printers may be on remote servers, as long as the VISTA machine can access them.&lt;br /&gt;
* In VISTA, you need to create an entry that represents the printer formatting characteristics in the terminal type file (#3.2)&lt;br /&gt;
* Then you need to create an entry in the device file (#3.5) that corresponds to the printer&lt;br /&gt;
&lt;br /&gt;
In practice, you don&#039;t need to do the second step because there are only about 5 commonly used subtypes in VISTA which you reuse.&lt;br /&gt;
&lt;br /&gt;
A Subtype is a file entry that contains the code to send to the printer, to open the printer, reset the printer, select the page size, adjust the margins, select the font etc.&lt;br /&gt;
&lt;br /&gt;
=== Subtypes ===&lt;br /&gt;
&lt;br /&gt;
Information about subtypes, including the most common subtypes, is listed [[VISTA_Printing_Printer_Subtypes|here]].&lt;br /&gt;
&lt;br /&gt;
=== Cache/Windows printing ===&lt;br /&gt;
When you specify a printer name in $I, Cache/Windows sends raw input directly to the printer, bypassing the driver. This makes setting up a printer on Windows easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: BROTHER                           $I: |PRN|\\VXQA\HL2270DW&lt;br /&gt;
  LOCATION OF TERMINAL: QA              SUBTYPE: P-HP-LASER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, all you have to do is put the printer name after |PRN| in $I. You can specify local printers; or you can specify shared printers using a UNC path (as shown above).&lt;br /&gt;
&lt;br /&gt;
=== Cache/Linux printing ===&lt;br /&gt;
You can use Pipes in Cache to print on Linux/Unix. Here&#039;s an operative example. Based on my experience, this is the best way to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM&#039;S PHARMACY PRINTER            $I: /usr/bin/lpr -PSAN_FL6 -l&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;QW&amp;quot;                 SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that there is a bug in DEVOK^%ZOSV (ZOSVONT) that prevents it from checking the device properly. This will show up if you misconfigure a device and then use it in Taskman. Short of fixing this, here is how to remove the bad prints from Taskman:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S (DEV,ZTIME,ZTSK)=&amp;quot;&amp;quot; F  S DEV=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV)) Q:DEV=&amp;quot;&amp;quot;  F  S ZTIME=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME)) Q:&#039;ZTIME  F  S ZTSK=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME,ZTSK)) Q:&#039;ZTSK  D DQ^%ZTLOAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the method developed but not adopted by the VA in patch [http://foia-vista.osehra.org/Patches_By_Application/XU-KERNEL/XU-8_SEQ-485_PAT-585.TXT XU*8.0*585]. After attempting to use this method in production, I would recommend against it, because a. CPRS and BCMA code is not configured to pick up PQ devices and b. %ZISC has issues with PQ devices. I have fixed both of these issues; but the code for this is not in VISTA yet.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample device that uses the XU*8.0*585 method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PRINTER_NAME                          $I: PRINTER_NAME&lt;br /&gt;
  PURGE OLD PRINT QUEUE FILES: YES      LOCATION OF TERMINAL: Cups Device&lt;br /&gt;
  SUBTYPE: P-HP-LTR-POR-C17L7-W128-NOFF TYPE: PRINT QUEUE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GT.M/Linux printing ===&lt;br /&gt;
Pipes again; just like Cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
NAME: PHAR-IP-DM                        $I: PHAR-IP-DM&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Dot-Matrix&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -l -P PHAR-IP-DM 2&amp;gt;/dev/null&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-EPSON-DM-P15-5L&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-LS                        $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Landscape&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P13-LS&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P12                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (PL)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: PL&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P12                TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P16                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (MAR)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: MAR&lt;br /&gt;
  SUBTYPE: P-HPLJ2-P16                  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How does printing from VISTA work? ===&lt;br /&gt;
How does this work?&lt;br /&gt;
The way this works is that $I becomes the IO variable. The open&lt;br /&gt;
parameters tells VISTA how to open the device.&lt;br /&gt;
&lt;br /&gt;
Vista does this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S IO=[$I]&lt;br /&gt;
S param=[OPEN PARAMETERS]&lt;br /&gt;
O IO:param&lt;br /&gt;
U IO&lt;br /&gt;
Send Open Execute from Subtype&lt;br /&gt;
U IO(0)&lt;br /&gt;
Interact with user; open another job, etc...&lt;br /&gt;
U IO&lt;br /&gt;
write write write&lt;br /&gt;
Send Close Execute from Subtype&lt;br /&gt;
C IO&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No need to do pre-open and post-close executes on the device which dynamically changes IOs.&lt;br /&gt;
&lt;br /&gt;
=== Avoiding the Staircase effect when printing from GT.M/Cache on *Nix with Laser Printers ===&lt;br /&gt;
For an explanation of the Staircase effect, see this:&lt;br /&gt;
http://www.digitalissues.co.uk/html/os/unix/stair.html&lt;br /&gt;
&lt;br /&gt;
Basically, the new line doesn&#039;t include a carriage return, so our output just flows off the page. So when you print a 10 line document, you may only see one line, as the rest was printed outside of the margin.&lt;br /&gt;
&lt;br /&gt;
If you are sending raw output (lpr with the -l option) from VISTA to any PCL compatible printer (and VISTA by and large uses PCL for formatting plain text output), you need to add this to your open execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
W $C(27),&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells the PCL compatible printer to append a CR to each LF or FF.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you are asking Cups to handle the formatting (lpr without the -l option), Cups properly formats the line returns through a Cups filter, so you don&#039;t have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Advanced printing topics ===&lt;br /&gt;
[[VISTA_Advanced_printing_topics|Advanced printing topics]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17190</id>
		<title>Setting up a VISTA Printer</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17190"/>
		<updated>2016-10-04T20:23:07Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* How does printing from VISTA work? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Programming VistA Issues]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This is an updated page. See [[Setting_up_a_Linux_Printer_Old|this page]] for old content.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
In order to set-up a printer in VISTA, there are three steps:&lt;br /&gt;
&lt;br /&gt;
* Add printer to CUPS or to Windows Printer list. The printers may be on remote servers, as long as the VISTA machine can access them.&lt;br /&gt;
* In VISTA, you need to create an entry that represents the printer formatting characteristics in the terminal type file (#3.2)&lt;br /&gt;
* Then you need to create an entry in the device file (#3.5) that corresponds to the printer&lt;br /&gt;
&lt;br /&gt;
In practice, you don&#039;t need to do the second step because there are only about 5 commonly used subtypes in VISTA which you reuse.&lt;br /&gt;
&lt;br /&gt;
A Subtype is a file entry that contains the code to send to the printer, to open the printer, reset the printer, select the page size, adjust the margins, select the font etc.&lt;br /&gt;
&lt;br /&gt;
=== Subtypes ===&lt;br /&gt;
&lt;br /&gt;
Information about subtypes, including the most common subtypes, is listed [[VISTA_Printing_Printer_Subtypes|here]].&lt;br /&gt;
&lt;br /&gt;
=== Cache/Windows printing ===&lt;br /&gt;
When you specify a printer name in $I, Cache/Windows sends raw input directly to the printer, bypassing the driver. This makes setting up a printer on Windows easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: BROTHER                           $I: |PRN|\\VXQA\HL2270DW&lt;br /&gt;
  LOCATION OF TERMINAL: QA              SUBTYPE: P-HP-LASER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, all you have to do is put the printer name after |PRN| in $I. You can specify local printers; or you can specify shared printers using a UNC path (as shown above).&lt;br /&gt;
&lt;br /&gt;
=== Cache/Linux printing ===&lt;br /&gt;
You can use Pipes in Cache to print on Linux/Unix. Here&#039;s an operative example. Based on my experience, this is the best way to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM&#039;S PHARMACY PRINTER            $I: /usr/bin/lpr -PSAN_FL6 -l&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;QW&amp;quot;                 SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that there is a bug in DEVOK^%ZOSV (ZOSVONT) that prevents it from checking the device properly. This will show up if you misconfigure a device and then use it in Taskman. Short of fixing this, here is how to remove the bad prints from Taskman:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S (DEV,ZTIME,ZTSK)=&amp;quot;&amp;quot; F  S DEV=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV)) Q:DEV=&amp;quot;&amp;quot;  F  S ZTIME=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME)) Q:&#039;ZTIME  F  S ZTSK=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME,ZTSK)) Q:&#039;ZTSK  D DQ^%ZTLOAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the method developed but not adopted by the VA in patch [http://foia-vista.osehra.org/Patches_By_Application/XU-KERNEL/XU-8_SEQ-485_PAT-585.TXT XU*8.0*585]. After attempting to use this method in production, I would recommend against it, because a. CPRS and BCMA code is not configured to pick up PQ devices and b. %ZISC has issues with PQ devices. I have fixed both of these issues; but the code for this is not in VISTA yet.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample device that uses the XU*8.0*585 method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PRINTER_NAME                          $I: PRINTER_NAME&lt;br /&gt;
  PURGE OLD PRINT QUEUE FILES: YES      LOCATION OF TERMINAL: Cups Device&lt;br /&gt;
  SUBTYPE: P-HP-LTR-POR-C17L7-W128-NOFF TYPE: PRINT QUEUE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GT.M/Linux printing ===&lt;br /&gt;
Pipes again; just like Cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
NAME: PHAR-IP-DM                        $I: PHAR-IP-DM&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Dot-Matrix&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -l -P PHAR-IP-DM 2&amp;gt;/dev/null&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-EPSON-DM-P15-5L&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-LS                        $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Landscape&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P13-LS&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P12                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (PL)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: PL&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P12                TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P16                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (MAR)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: MAR&lt;br /&gt;
  SUBTYPE: P-HPLJ2-P16                  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How does printing from VISTA work? ===&lt;br /&gt;
How does this work?&lt;br /&gt;
The way this works is that $I becomes the IO variable. The open&lt;br /&gt;
parameters tells VISTA how to open the device.&lt;br /&gt;
&lt;br /&gt;
Vista does this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S IO=[$I]&lt;br /&gt;
S param=[OPEN PARAMETERS]&lt;br /&gt;
O IO:param&lt;br /&gt;
U IO&lt;br /&gt;
Send Open Execute from Subtype&lt;br /&gt;
U IO(0)&lt;br /&gt;
Interact with user; open another job, etc...&lt;br /&gt;
U IO&lt;br /&gt;
write write write&lt;br /&gt;
Send Close Execute from Subtype&lt;br /&gt;
C IO&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No need to do pre-open and post-close executes on the device which dynamically changes IOs.&lt;br /&gt;
&lt;br /&gt;
=== Avoiding the Staircase effect when printing from GT.M/Cache on *Nix with Laser Printers ===&lt;br /&gt;
For an explanation of the Staircase effect, see this:&lt;br /&gt;
http://www.digitalissues.co.uk/html/os/unix/stair.html&lt;br /&gt;
&lt;br /&gt;
Basically, the new line doesn&#039;t do a carriage return with it, so our output just flows off the page. So when you print a 10 line document, you may only see one line, as the rest was printed outside of the margin.&lt;br /&gt;
&lt;br /&gt;
If you are sending raw output (lpr with the -l option) from VISTA to any PCL compatible printer (and VISTA by and large uses PCL for formatting plain text output), you need to add this to your open execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
W $C(27),&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells the PCL compatible printer to append a CR to each LF or FF.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you are asking cups to handle the formatting (lpr without the -l option), cups properly formats the line returns through a cups filter, so you don&#039;t have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Advanced printing topics ===&lt;br /&gt;
[[VISTA_Advanced_printing_topics|Advanced printing topics]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17189</id>
		<title>Setting up a VISTA Printer</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17189"/>
		<updated>2016-10-04T20:21:37Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Setting up a printer in VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Programming VistA Issues]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This is an updated page. See [[Setting_up_a_Linux_Printer_Old|this page]] for old content.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
In order to set-up a printer in VISTA, there are three steps:&lt;br /&gt;
&lt;br /&gt;
* Add printer to CUPS or to Windows Printer list. The printers may be on remote servers, as long as the VISTA machine can access them.&lt;br /&gt;
* In VISTA, you need to create an entry that represents the printer formatting characteristics in the terminal type file (#3.2)&lt;br /&gt;
* Then you need to create an entry in the device file (#3.5) that corresponds to the printer&lt;br /&gt;
&lt;br /&gt;
In practice, you don&#039;t need to do the second step because there are only about 5 commonly used subtypes in VISTA which you reuse.&lt;br /&gt;
&lt;br /&gt;
A Subtype is a file entry that contains the code to send to the printer, to open the printer, reset the printer, select the page size, adjust the margins, select the font etc.&lt;br /&gt;
&lt;br /&gt;
=== Subtypes ===&lt;br /&gt;
&lt;br /&gt;
Information about subtypes, including the most common subtypes, is listed [[VISTA_Printing_Printer_Subtypes|here]].&lt;br /&gt;
&lt;br /&gt;
=== Cache/Windows printing ===&lt;br /&gt;
When you specify a printer name in $I, Cache/Windows sends raw input directly to the printer, bypassing the driver. This makes setting up a printer on Windows easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: BROTHER                           $I: |PRN|\\VXQA\HL2270DW&lt;br /&gt;
  LOCATION OF TERMINAL: QA              SUBTYPE: P-HP-LASER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, all you have to do is put the printer name after |PRN| in $I. You can specify local printers; or you can specify shared printers using a UNC path (as shown above).&lt;br /&gt;
&lt;br /&gt;
=== Cache/Linux printing ===&lt;br /&gt;
You can use Pipes in Cache to print on Linux/Unix. Here&#039;s an operative example. Based on my experience, this is the best way to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM&#039;S PHARMACY PRINTER            $I: /usr/bin/lpr -PSAN_FL6 -l&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;QW&amp;quot;                 SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that there is a bug in DEVOK^%ZOSV (ZOSVONT) that prevents it from checking the device properly. This will show up if you misconfigure a device and then use it in Taskman. Short of fixing this, here is how to remove the bad prints from Taskman:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S (DEV,ZTIME,ZTSK)=&amp;quot;&amp;quot; F  S DEV=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV)) Q:DEV=&amp;quot;&amp;quot;  F  S ZTIME=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME)) Q:&#039;ZTIME  F  S ZTSK=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME,ZTSK)) Q:&#039;ZTSK  D DQ^%ZTLOAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the method developed but not adopted by the VA in patch [http://foia-vista.osehra.org/Patches_By_Application/XU-KERNEL/XU-8_SEQ-485_PAT-585.TXT XU*8.0*585]. After attempting to use this method in production, I would recommend against it, because a. CPRS and BCMA code is not configured to pick up PQ devices and b. %ZISC has issues with PQ devices. I have fixed both of these issues; but the code for this is not in VISTA yet.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample device that uses the XU*8.0*585 method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PRINTER_NAME                          $I: PRINTER_NAME&lt;br /&gt;
  PURGE OLD PRINT QUEUE FILES: YES      LOCATION OF TERMINAL: Cups Device&lt;br /&gt;
  SUBTYPE: P-HP-LTR-POR-C17L7-W128-NOFF TYPE: PRINT QUEUE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GT.M/Linux printing ===&lt;br /&gt;
Pipes again; just like Cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
NAME: PHAR-IP-DM                        $I: PHAR-IP-DM&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Dot-Matrix&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -l -P PHAR-IP-DM 2&amp;gt;/dev/null&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-EPSON-DM-P15-5L&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-LS                        $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Landscape&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P13-LS&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P12                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (PL)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: PL&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P12                TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P16                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (MAR)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: MAR&lt;br /&gt;
  SUBTYPE: P-HPLJ2-P16                  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How does printing from VISTA work? ===&lt;br /&gt;
How does this work?&lt;br /&gt;
The way this works is that $I becomes the IO variable. The open&lt;br /&gt;
parameters tells VISTA how to open the device.&lt;br /&gt;
&lt;br /&gt;
Vista does this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S IO=[$I]&lt;br /&gt;
S param=[OPEN PARAMETERS]&lt;br /&gt;
O IO:param&lt;br /&gt;
U IO&lt;br /&gt;
Send Open Execute from Subtype&lt;br /&gt;
U IO(0)&lt;br /&gt;
Interact with user; open another job, etc...&lt;br /&gt;
U IO&lt;br /&gt;
write write write&lt;br /&gt;
Send Close Execute from Subtype&lt;br /&gt;
C IO&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No need to do pre-open and post-close executes on the device which dynamically change IOs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Avoiding the Staircase effect when printing from GT.M/Cache on *Nix with Laser Printers ===&lt;br /&gt;
For an explanation of the Staircase effect, see this:&lt;br /&gt;
http://www.digitalissues.co.uk/html/os/unix/stair.html&lt;br /&gt;
&lt;br /&gt;
Basically, the new line doesn&#039;t do a carriage return with it, so our output just flows off the page. So when you print a 10 line document, you may only see one line, as the rest was printed outside of the margin.&lt;br /&gt;
&lt;br /&gt;
If you are sending raw output (lpr with the -l option) from VISTA to any PCL compatible printer (and VISTA by and large uses PCL for formatting plain text output), you need to add this to your open execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
W $C(27),&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells the PCL compatible printer to append a CR to each LF or FF.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you are asking cups to handle the formatting (lpr without the -l option), cups properly formats the line returns through a cups filter, so you don&#039;t have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Advanced printing topics ===&lt;br /&gt;
[[VISTA_Advanced_printing_topics|Advanced printing topics]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17188</id>
		<title>Setting up a VISTA Printer</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=Setting_up_a_VISTA_Printer&amp;diff=17188"/>
		<updated>2016-10-04T19:29:47Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Setting up a printer in VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Programming VistA Issues]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This is an updated page. See [[Setting_up_a_Linux_Printer_Old|this page]] for old content.&lt;br /&gt;
&lt;br /&gt;
== Setting up a printer in VISTA ==&lt;br /&gt;
In order to set-up a printer in VISTA, there are three steps:&lt;br /&gt;
&lt;br /&gt;
* Add printer to CUPS or to Windows Printer list. The printers may be on remote servers, as long as the VISTA machine can access them.&lt;br /&gt;
* In VISTA, you need to create an entry that represents the printer formatting characteristics in the terminal type file (#3.2)&lt;br /&gt;
* Then you need to create an entry in the device file (#3.5) that corresponds to the printer&lt;br /&gt;
&lt;br /&gt;
In practice, you don&#039;t need to do the second step because there are only about 5 commonly used subtypes in VISTA which you reuse.&lt;br /&gt;
&lt;br /&gt;
A Subtype is a file entry that contains the code to send to the printer to open the printer, reset the printer, select the page size, adjust the margins, select the font etc.&lt;br /&gt;
&lt;br /&gt;
=== Subtypes ===&lt;br /&gt;
&lt;br /&gt;
Information about subtypes, including the most common subtypes, is listed [[VISTA_Printing_Printer_Subtypes|here]].&lt;br /&gt;
&lt;br /&gt;
=== Cache/Windows printing ===&lt;br /&gt;
When you specify a printer name in $I, Cache/Windows sends raw input directly to the printer, bypassing the driver. This makes setting up a printer on Windows easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: BROTHER                           $I: |PRN|\\VXQA\HL2270DW&lt;br /&gt;
  LOCATION OF TERMINAL: QA              SUBTYPE: P-HP-LASER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, all you have to do is put the printer name after |PRN| in $I. You can specify local printers; or you can specify shared printers using a UNC path (as shown above).&lt;br /&gt;
&lt;br /&gt;
=== Cache/Linux printing ===&lt;br /&gt;
You can use Pipes in Cache to print on Linux/Unix. Here&#039;s an operative example. Based on my experience, this is the best way to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM&#039;S PHARMACY PRINTER            $I: /usr/bin/lpr -PSAN_FL6 -l&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;QW&amp;quot;                 SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that there is a bug in DEVOK^%ZOSV (ZOSVONT) that prevents it from checking the device properly. This will show up if you misconfigure a device and then use it in Taskman. Short of fixing this, here is how to remove the bad prints from Taskman:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S (DEV,ZTIME,ZTSK)=&amp;quot;&amp;quot; F  S DEV=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV)) Q:DEV=&amp;quot;&amp;quot;  F  S ZTIME=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME)) Q:&#039;ZTIME  F  S ZTSK=$O(^%ZTSCH(&amp;quot;IO&amp;quot;,DEV,ZTIME,ZTSK)) Q:&#039;ZTSK  D DQ^%ZTLOAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use the method developed but not adopted by the VA in patch [http://foia-vista.osehra.org/Patches_By_Application/XU-KERNEL/XU-8_SEQ-485_PAT-585.TXT XU*8.0*585]. After attempting to use this method in production, I would recommend against it, because a. CPRS and BCMA code is not configured to pick up PQ devices and b. %ZISC has issues with PQ devices. I have fixed both of these issues; but the code for this is not in VISTA yet.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample device that uses the XU*8.0*585 method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PRINTER_NAME                          $I: PRINTER_NAME&lt;br /&gt;
  PURGE OLD PRINT QUEUE FILES: YES      LOCATION OF TERMINAL: Cups Device&lt;br /&gt;
  SUBTYPE: P-HP-LTR-POR-C17L7-W128-NOFF TYPE: PRINT QUEUE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GT.M/Linux printing ===&lt;br /&gt;
Pipes again; just like Cache.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
NAME: PHAR-IP-DM                        $I: PHAR-IP-DM&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Dot-Matrix&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -l -P PHAR-IP-DM 2&amp;gt;/dev/null&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-EPSON-DM-P15-5L&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-LS                        $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Landscape&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P13-LS&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P12                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (PL)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: PL&lt;br /&gt;
  SUBTYPE: P-HPLJ4SI-P12                TYPE: TERMINAL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NAME: PHAR-IP-POR-P16                   $I: PHAR-IP&lt;br /&gt;
  LOCATION OF TERMINAL: Inpatient Pharmacy Portrait (MAR)&lt;br /&gt;
  OPEN PARAMETERS: (shell=&amp;quot;/bin/sh&amp;quot;:comm=&amp;quot;lpr -P PHAR-IP -l&amp;quot;:WRITEONLY)::&amp;quot;pipe&amp;quot;&lt;br /&gt;
MNEMONIC: MAR&lt;br /&gt;
  SUBTYPE: P-HPLJ2-P16                  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How does printing from VISTA work? ===&lt;br /&gt;
How does this work?&lt;br /&gt;
The way this works is that $I becomes the IO variable. The open&lt;br /&gt;
parameters tells VISTA how to open the device.&lt;br /&gt;
&lt;br /&gt;
Vista does this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S IO=[$I]&lt;br /&gt;
S param=[OPEN PARAMETERS]&lt;br /&gt;
O IO:param&lt;br /&gt;
U IO&lt;br /&gt;
Send Open Execute from Subtype&lt;br /&gt;
U IO(0)&lt;br /&gt;
Interact with user; open another job, etc...&lt;br /&gt;
U IO&lt;br /&gt;
write write write&lt;br /&gt;
Send Close Execute from Subtype&lt;br /&gt;
C IO&lt;br /&gt;
etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No need to do pre-open and post-close executes on the device which dynamically change IOs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Avoiding the Staircase effect when printing from GT.M/Cache on *Nix with Laser Printers ===&lt;br /&gt;
For an explanation of the Staircase effect, see this:&lt;br /&gt;
http://www.digitalissues.co.uk/html/os/unix/stair.html&lt;br /&gt;
&lt;br /&gt;
Basically, the new line doesn&#039;t do a carriage return with it, so our output just flows off the page. So when you print a 10 line document, you may only see one line, as the rest was printed outside of the margin.&lt;br /&gt;
&lt;br /&gt;
If you are sending raw output (lpr with the -l option) from VISTA to any PCL compatible printer (and VISTA by and large uses PCL for formatting plain text output), you need to add this to your open execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em&amp;quot;&amp;gt;&lt;br /&gt;
W $C(27),&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells the PCL compatible printer to append a CR to each LF or FF.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if you are asking cups to handle the formatting (lpr without the -l option), cups properly formats the line returns through a cups filter, so you don&#039;t have to do anything.&lt;br /&gt;
&lt;br /&gt;
=== Advanced printing topics ===&lt;br /&gt;
[[VISTA_Advanced_printing_topics|Advanced printing topics]]&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17187</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17187"/>
		<updated>2016-10-03T23:59:16Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Advanced Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17186</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17186"/>
		<updated>2016-10-03T23:58:52Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Printing PDFs from VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17185</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17185"/>
		<updated>2016-10-03T23:58:35Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Advanced troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute. Please note that you need to change &amp;quot;NWS&amp;quot; to (newversion) on GT.M.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17184</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17184"/>
		<updated>2016-10-03T23:56:31Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
=== Advanced troubleshooting ===&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF; or ZPL II and use a Zebra emulator.&lt;br /&gt;
&lt;br /&gt;
To capture an output from VISTA, you need to create a device whose type is HFS but whose destination is pre-determined. Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: SAM-DIRECT-HFS-PRINTER            $I: /tmp/op-dev6-lbl-sam.pcl&lt;br /&gt;
  LOCATION OF TERMINAL: File&lt;br /&gt;
  OPEN PARAMETERS: &amp;quot;NWS&amp;quot;                SUBTYPE: P-HPLJ4SI-P12&lt;br /&gt;
  TYPE: HOST FILE SERVER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the file for each job, so that they won&#039;t overwrite each other, you can append something to IO in the pre-open execute.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use for PCL, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
This is the emulator I use for ZPL II, http://labelary.com/viewer.html&lt;br /&gt;
&lt;br /&gt;
To use GhostPCL, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17183</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17183"/>
		<updated>2016-10-03T23:45:52Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Zebra Printer Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
* Label not aligned vertically&lt;br /&gt;
* Label not aligned horizontally&lt;br /&gt;
* Labels are not dark enough.&lt;br /&gt;
* Label gets cut off&lt;br /&gt;
* VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17182</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17182"/>
		<updated>2016-10-03T23:45:31Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Various troubleshooting topics -- how fun! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
==== Only a single line prints ====&lt;br /&gt;
You are seeing the staircase effect. See the Staircase section in [[Setting_up_a_VISTA_Printer]].&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
 * Label not aligned vertically&lt;br /&gt;
 * Label not aligned horizontally&lt;br /&gt;
 * Labels are not dark enough.&lt;br /&gt;
 * Label gets cut off&lt;br /&gt;
 * VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17181</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17181"/>
		<updated>2016-10-03T23:43:15Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Various troubleshooting topics -- how fun! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
=== Laser Printer Issues ===&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
==== Extra pages ====&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
==== Wrapping ====&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
=== Zebra Printer Issues ===&lt;br /&gt;
From my memory, these are typically the issues you face:&lt;br /&gt;
&lt;br /&gt;
 * Label not aligned vertically&lt;br /&gt;
 * Label not aligned horizontally&lt;br /&gt;
 * Labels are not dark enough.&lt;br /&gt;
 * Label gets cut off&lt;br /&gt;
 * VISTA printed labels are too small&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned vertically ====&lt;br /&gt;
Zebras mostly auto calibrate printing on continuous media. Check your Zebra&#039;s manual on how to do that for the specific model.&lt;br /&gt;
&lt;br /&gt;
==== Label not aligned horizontally ====&lt;br /&gt;
Zebras don&#039;t auto align to the width. You have to set the print width yourself. They can detect the start of the label though.&lt;br /&gt;
&lt;br /&gt;
To do that, find your printer dpi setting, and multiply that by the width of your label. E.g. 202 dpi with 3.5&amp;quot;, you need to run this command from the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA^PW707^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t solve your problem, you need to look carefully at the actual feeding of the label into the zebra printer. Read the manual carefully. I have seen many people &amp;quot;wing it&amp;quot; and do it incorrectly. I have even seen a printer where the left margin guide wasn&#039;t used and a rubber band was placed there. After you turn off the restart the printer, it tries to self calibrate.&lt;br /&gt;
&lt;br /&gt;
==== Label Text is not dark enough ====&lt;br /&gt;
There are two tunable circle things on the top of the print head that can be turned to increase the darkness. Try that. There is also a Zebra setting that can be changed to increase the darkness.&lt;br /&gt;
&lt;br /&gt;
==== Label gets cut off ====&lt;br /&gt;
If the label gets cut off on the right hand side of the label, check your print width (see &#039;Label not aligned horizontally&#039;), and if that&#039;s not the issue, check the position of the ribbon vis a vis the labels. The printer may be trying to print, but there is no ribbon at the place it&#039;s trying to print. If it is getting cut off from the left side, check that your labels are using the left hand guide and are not colliding with it. If it is getting cut off vertically, you need to calibrate the printer. If it still gets cut off, you need to capture the ZPL II that is sent by VISTA and see 1. that it&#039;s formatted correctly and 2. that there isn&#039;t too much information to print.&lt;br /&gt;
&lt;br /&gt;
==== VISTA printed labels are too small ====&lt;br /&gt;
This means that you bought a Zebra printer with the wrong dpi. You have to return it and buy another one. VISTA wants printers with 202 DPI. If you want to use the new printer, you need to re-write some of the label code.&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17180</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17180"/>
		<updated>2016-10-03T23:13:42Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Testing Printers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
If you run this on Cache, Cache steals your IO device between prompts. Therefore U IO to D ^%ZISC need to be on a single line.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
=== Extra pages ===&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
=== Wrapping ===&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17179</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17179"/>
		<updated>2016-10-03T23:04:54Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Testing Printers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Setting up a Printer in VISTA ==&lt;br /&gt;
See [[Setting_up_a_VISTA_Printer|this page]]&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
=== Extra pages ===&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
=== Wrapping ===&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17178</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17178"/>
		<updated>2016-10-03T23:01:49Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Communicating with a printer on the network for the first time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the printer in the operating system ==&lt;br /&gt;
After confirming the connection, you need to set-up the printer in the operating system. VISTA does NOT need any drivers for the printers to be installed.&lt;br /&gt;
&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
=== Extra pages ===&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
=== Wrapping ===&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17177</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17177"/>
		<updated>2016-10-03T22:56:28Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Communicating with a printer on the network for the first time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Nothing prevents you from doing a USB printer or even a parallel port printer, but in my experience, nobody uses those interfaces in production anymore.&lt;br /&gt;
&lt;br /&gt;
Get the IP address first. You can usually obtain that by printing an information sheet from the printer. You have to consult the printer manual to find out where you can print that information sheet. You can also try to identify the printer from the list of connected hosts on your network.&lt;br /&gt;
&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer  on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A successful connection will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connection to XX.XX.XX.XX 9100 port [tcp/jetdirect] succeeded!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An unsuccessful connection will either just hang or tell you connection refused.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nc: connect to XXXXXXXXX port 9100 (tcp) failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
=== Extra pages ===&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
=== Wrapping ===&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17176</id>
		<title>VISTA Advanced printing topics</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Advanced_printing_topics&amp;diff=17176"/>
		<updated>2016-10-03T21:46:44Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Advanced Printing Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Advanced Printing Topics =&lt;br /&gt;
Authored mainly by Sam Habiel, the printer &amp;quot;sensei&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== How do computers communicate with printers, software-wise? ==&lt;br /&gt;
This is a pretty difficult topic. Cheaper printers only accept binary data that is hardcoded by the computers; typically these printers are only supported on Windows, and thus are named &amp;quot;Winprinters&amp;quot;. Higher end printers have a processor on them that can typically interpret PCL5, PCL6, and PS; and possibly PDF. These printers are easily supported in Linux. Commerical label printers (like Zebras) always accept their own programming language.&lt;br /&gt;
&lt;br /&gt;
== VISTA and what it really sends ==&lt;br /&gt;
VISTA sends PCL5 to laser printers; or a printer specific language for label printers--most commonly ZPL II for Zebra printers. For laser printers, you need to make sure that your printer supports PCL5. All HP Printers support PCL5, no matter how cheap; other manufacturers only support it on their higher end printers (not too high end--anything that isn&#039;t the cheapest printer may support PCL5). If you need to look it up, go to the manufacturer&#039;s website and look at the technical specs sheet. The section is typically called &amp;quot;supported emulations&amp;quot;; or &amp;quot;supported languages&amp;quot;. What VISTA sends is determined by the sub-type defined for the device.&lt;br /&gt;
&lt;br /&gt;
== Communicating with a printer on the network for the first time ==&lt;br /&gt;
Whenever I set up a new printer, I tend to ensure that I can talk to it directly, with nobody in the middle. I use the netcat command (&#039;nc&#039;) to do that, connecting to the IP address of the printer (obtained by printing the information sheet from the printer) on port 9100. Make sure to add the -v flag to netcat so that it can report whether it succeeded in connecting at all. It is very possible that you connected to a printer; but you just don&#039;t know which one.&lt;br /&gt;
&lt;br /&gt;
(Aside: This can be done from VISTA using D CALL^%ZISTCP(ip_address,port,time_out)--but netcat is easier.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of me trying to talk to a PCL printer, so it will print the word &amp;quot;test&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;TEST&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and here&#039;s an example printing a Datamatrix code on a Zebra printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc -v 10.10.10.128 9100 &amp;lt;&amp;lt;&amp;lt; &amp;quot;^XA^FO50,100^BXN,10,200^FDTESTTEST^FS^XZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Printers ==&lt;br /&gt;
To test printers in VISTA after setting it up, there are a few steps you have a to go through.&lt;br /&gt;
&lt;br /&gt;
Invoke via %ZIS first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D ^%ZIS&lt;br /&gt;
&lt;br /&gt;
DEVICE: HOME//MY PRINTER&lt;br /&gt;
&lt;br /&gt;
U IO&lt;br /&gt;
&lt;br /&gt;
W &amp;quot;TEST&amp;quot;,!,&amp;quot;TEST&amp;quot;,! D ^%ZISC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the output. If it&#039;s okay, you are ready to move to the next step. If you see the &amp;quot;staircase&amp;quot; effect, you need to go back and set-up the terminal type correctly [[Setting_up_a_Linux_Printer|here]].&lt;br /&gt;
&lt;br /&gt;
The next menu option to try is Send Test Pattern to Terminal [XUTTEST]. If that works, then you are good to go.&lt;br /&gt;
&lt;br /&gt;
== Various troubleshooting topics -- how fun! ==&lt;br /&gt;
There are various issue that come up regularly with VISTA.&lt;br /&gt;
&lt;br /&gt;
Use this page as a reference for PCL:&lt;br /&gt;
&lt;br /&gt;
http://www.pclviewer.com/resources/reference/&lt;br /&gt;
&lt;br /&gt;
=== Extra pages ===&lt;br /&gt;
Extra pages can happen for three different reasons:&lt;br /&gt;
 &lt;br /&gt;
* By default, VISTA prints an extra page after each print job. This is for historical reasons; as most of the early printers were dot-matrix. Today, it&#039;s recommended to disable this. To disable this, you can do it at the device level or the terminal type level. At the device level, set &amp;lt;code&amp;gt;SUPPRESS FORM FEED AT CLOSE&amp;lt;/code&amp;gt; to yes. For the terminal type, set &amp;lt;code&amp;gt;CLOSE EXECUTE&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* The text doesn&#039;t fit the page and spills over to the next page. VISTA printing options must follow the IOSL value (Page Length in Terminal Type or Device--Device overrides Terminal Type). Most of the time this has to do with the fact that the text size for the report is too large; or that the margins are not appropriate. Based on visual inspection, you should decide what to do. The unlikely case is that the VISTA programmer is not obeying IOSL; but that is for you to determine.&lt;br /&gt;
* If both of the above fail, it&#039;s likely that VISTA sends a hard coded form feed to the printer. You need to capture the output by capturing the print to a file (use HFS;subtype) and visually examine it in a programming editor.&lt;br /&gt;
&lt;br /&gt;
=== Wrapping ===&lt;br /&gt;
Typically this has to do with whether the printer is configured to take 132 characters or 80 characters; if not, then it has to do with the font size.&lt;br /&gt;
&lt;br /&gt;
VISTA has these typical formats for printing:&lt;br /&gt;
&lt;br /&gt;
* 12 cpi 8 lpi Portrait (most reports)&lt;br /&gt;
* 17 cpi 7 lpi Portrait (MAR)&lt;br /&gt;
* 14 cpi 6 lpi Landscape (132 wide reports)&lt;br /&gt;
* 22 cpi 12 lpi Landscape (228 wide reports)&lt;br /&gt;
&lt;br /&gt;
== Typical PCL String ==&lt;br /&gt;
To construct a PCL in VISTA, you typically put everything in the Open Execute. The Close Execute should always be set to &amp;lt;code&amp;gt;S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&amp;lt;/code&amp;gt; unless you want to do something special. The Form Feed accepts PCL as well.&lt;br /&gt;
&lt;br /&gt;
The typical PCL sequence for an Open Execute is as follows:&lt;br /&gt;
&lt;br /&gt;
* Reset&lt;br /&gt;
* Set Line Carriage mode (CR, CRLF, or LF)&lt;br /&gt;
* Set Orientation (Portrait or Landscape)&lt;br /&gt;
* Set Character Set (optional; not needed for US printing; may need to Spanish)&lt;br /&gt;
* Set Margins (optional; but you will probably need it at some point)&lt;br /&gt;
* Set Font&lt;br /&gt;
&lt;br /&gt;
When constructing a string, I recommend using *27 rather than $C(27) because it&#039;s shorter, and you will type a lot of it.&lt;br /&gt;
&lt;br /&gt;
An example. Note that this needs to be all in one string. It&#039;s separated here for education.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
W *27,&amp;quot;E&amp;quot;    ; Reset&lt;br /&gt;
W *27,&amp;quot;&amp;amp;k2G&amp;quot; ; Set Carriage mode to LF.&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l0O&amp;quot; ; Portrait; Landscape is 1O.&lt;br /&gt;
...          ; Character Set Omitted&lt;br /&gt;
W *27,&amp;quot;&amp;amp;l4E&amp;quot; ; Top Margin 4 lines&lt;br /&gt;
W *27,&amp;quot;&amp;amp;a5L&amp;quot; ; Left Martin 5 columns&lt;br /&gt;
W *27,&amp;quot;(s0p12h0s0b4099T&amp;quot; ; Fixed Pitch; 12 cpi, fixed pitch for secondary font, Medium Weight, select courier font.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Functions ==&lt;br /&gt;
I won&#039;t document this in detail, but here are some advanced examples. These ones do headers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80-HD         RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p12h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5&lt;br /&gt;
L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h&lt;br /&gt;
0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot; S ($X,$&lt;br /&gt;
Y)=0                                    CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128-HD        RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2100x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p17h9v0s0b0T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;l7C&amp;quot;_$C(27&lt;br /&gt;
)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;#&amp;quot;,&amp;quot;&amp;quot;)                     PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(2&lt;br /&gt;
7),&amp;quot;*p2100x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,*27,&amp;quot;&amp;amp;l4E&amp;quot;,*27,&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&lt;br /&gt;
(s0p17h9v0s0b0T&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27,69)&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228-HD      RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p22h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p22h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132-HD       RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: $C(12)_$C(27)_&amp;quot;&amp;amp;f0S&amp;quot;_$C(27)_&amp;quot;&amp;amp;l3E&amp;quot;_$C(27)_&amp;quot;*p2750x,0Y&amp;quot;_$C(27)_&amp;quot;(s1p&lt;br /&gt;
16h0s0b16602THEADER&amp;quot;_$C(27)_&amp;quot;(s0p14h0s0b4099T&amp;quot;_$C(27)_&amp;quot;&amp;amp;l4E&amp;quot;_$C(27)_&amp;quot;&amp;amp;f1S&amp;quot;_$P(&amp;quot;&lt;br /&gt;
#&amp;quot;,&amp;quot;&amp;quot;)                                  PAGE LENGTH: 46&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,$C(27),&amp;quot;&amp;amp;f0S&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;*p2750x,0Y&amp;quot;,$C(27)_&amp;quot;(s1p16h0s0b16602THEADER&amp;quot;,$C(27),&amp;quot;(s0p14h0s0b4099T&amp;quot;,$C(27),&amp;quot;&amp;amp;f1S&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and this one does a watermark:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-PORTRAIT-C16L7-WM            SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96&lt;br /&gt;
  FORM FEED: $c(27)_&amp;quot;*c5760x6000Y&amp;quot;_$c(27)_&amp;quot;*p150x150Y&amp;quot;_$c(27)_&amp;quot;*c0T&amp;quot;_$c(27)_&amp;quot;%1B&lt;br /&gt;
IN;SP1;DI1,-1;SD2,1,4,140,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;_$c&lt;br /&gt;
(3,27)_&amp;quot;%1A&amp;quot;_$c(12)                     PAGE LENGTH: 60&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;(8U&amp;quot;,*27,&amp;quot;(s0P&amp;quot;,*27,&amp;quot;(s16H&amp;quot;,*27,&amp;quot;(s9V&amp;quot;,*27,&amp;quot;(s0S&amp;quot;&lt;br /&gt;
,*27,&amp;quot;(s-3B&amp;quot;,*27,&amp;quot;(s0T&amp;quot;,*27,&amp;quot;&amp;amp;l88P&amp;quot;,*27,&amp;quot;&amp;amp;a255M&amp;quot;,*27,&amp;quot;&amp;amp;k2S&amp;quot;,*27,&amp;quot;&amp;amp;l7C&amp;quot;,*27,&amp;quot;&amp;amp;s1C&lt;br /&gt;
&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W *27,&amp;quot;*c5760x6000Y&amp;quot;,*27,&amp;quot;*p150x150Y&amp;quot;,*27,&amp;quot;*c0T&amp;quot;,*27,&amp;quot;%1B&amp;quot;,&amp;quot;IN;&lt;br /&gt;
SP1;DI1,-1;SD1,21,2,1,4,140,5,0,6,3,7,4148;SS;PA0,7000;FT10,5;CF2,0;LO21;LBWATERMARK&amp;quot;&lt;br /&gt;
_$C(3),*27,&amp;quot;%1A&amp;quot;                     DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced troubleshooting ==&lt;br /&gt;
If you are stuck with a particularly difficult problem, it may be useful to capture the PCL and use a PCL emulator and print to a PDF.&lt;br /&gt;
&lt;br /&gt;
This is the emulator I use, http://www.ghostscript.com/GhostPCL.html.&lt;br /&gt;
&lt;br /&gt;
To use it, here is a sample invocation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat vista_print-0001.pcl | sed -e &amp;quot;s/\x1b\[H\x1b\[J/\xc/g&amp;quot; | C:\Users\shabiel\workspace\ghostpcl-9.15-win32\pcl6-9.15-win32.exe -dBATCH -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=&amp;quot;testpdf.sam&amp;quot; -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need the sed part typically; I added this for interpretation of slave prints.&lt;br /&gt;
&lt;br /&gt;
== Printing PDFs from VISTA ==&lt;br /&gt;
Using GhostPCL, you can directly print out a PDF from VISTA. Here&#039;s an example in GT.M on Linux:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: PDF WRITER                        $I: PDF-WRITER&lt;br /&gt;
  LOCATION OF TERMINAL: /tmp/           &lt;br /&gt;
  OPEN PARAMETERS: (comm=&amp;quot;pcl6 -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -SOutputFile=&lt;br /&gt;
/tmp/green-sheet.pdf -&amp;quot;)::&amp;quot;pipe&amp;quot;        SUBTYPE: P-HP BARCODER&lt;br /&gt;
  TYPE: TERMINAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Windows, you can add a Windows printer that automatically calls GhostPCL. You need to use this amazing piece of software:&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/projects/mfilemon/&lt;br /&gt;
&lt;br /&gt;
Once you install it and configure it, you need to set the $I appropriately.&lt;br /&gt;
&lt;br /&gt;
== Finding the TCP/IP address for a print queue name ==&lt;br /&gt;
On Linux, the lpstat command tells you details about the print queue&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -v&lt;br /&gt;
&lt;br /&gt;
device for TEST-01: socket://192.168.10.3:9100&lt;br /&gt;
&lt;br /&gt;
device for TEST-02: socket://192.168.10.4:9100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finding the ready status of a print queue ==&lt;br /&gt;
&lt;br /&gt;
On Linux, the lpstat command tells you all the printers and what their status is.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -a&lt;br /&gt;
&lt;br /&gt;
TEST-01 accepting requests since Sun 25 Dec 2005 09:54:34 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-02 accepting requests since Thu 28 Nov 2013 09:56:11 AM EST&lt;br /&gt;
&lt;br /&gt;
TEST-03 accepting requests since Fri 17 Mar 2017 10:03:00 AM EST&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
OR for a particular printer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lpstat -p  TEST-03&lt;br /&gt;
&lt;br /&gt;
printer TEST-03 is idle.  enabled since Fri 17 Mar 2017 08:39:00 AM EDT&lt;br /&gt;
        Ready to print.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17175</id>
		<title>VISTA Printing Printer Subtypes</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17175"/>
		<updated>2016-10-03T21:35:35Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* ZPL II Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= VISTA Subtypes =&lt;br /&gt;
&#039;&#039;Written by Sam Habiel&#039;&#039;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is a Subtype ==&lt;br /&gt;
A subtype (stored in file #3.2 TERMINAL TYPE) is an entry associated with each device that tells the device how to handle special non-standard situations; plus some base characteristics. With printers, typically a subtype has two fields populated: Open Execute and Close Execute, in addition to Right Margin, Form Feed, Page Length, and Back Space. The Open Execute resets the printer, sets the page orientation, sets the top and left margins, and sets the font size. The close execute sets the variable IONOFF to an empty string (effectively defining it in the symbol table), and sends a reset to the printer. Right Margin and Back Space aren&#039;t used with printers; Form Feed goes into the M variable IOF, Page Length goes into the M variable IOSL (&amp;quot;IO Screen Length&amp;quot;) determines how many lines are to be printed on each page before VISTA sends an IOF to go to the next page. That&#039;s important to keep in mind since the number of lines that VISTA prints needs to match how many lines are available on the page, otherwise the printer will either spit an extra page containing the extra lines or it will clip the output, depending on whether you specified how many lines are to be printed in PCL. The subtypes below don&#039;t specify how many lines to print, so the former behavior will happen with them. The solution is to decrease page length.&lt;br /&gt;
&lt;br /&gt;
The reason IONOFF is needed is that by default VISTA will send an extra page following each print out; because it was developed in the days of dot-matrix printers, where the extra page separated jobs. The days of dot-matrix printing are practically over; most printers used today are inkjet or laser. Typically we don&#039;t want an extra page at the end. You may be lead to believe that IONOFF is enough; however, most reports in VISTA have hardcoded extra pages at the beginning or end. I was told there was going to be a project in the late 90&#039;s to make sure all reports relied on the device handler for printing separator pages, but that never happened.&lt;br /&gt;
&lt;br /&gt;
There is a field in the device file called &amp;quot;SUPPRESS FORM FEED AT CLOSE&amp;quot;. This field does the exact same thing as setting IONOFF in the Close Execute in the terminal type. In general, I recommend setting IONOFF in the terminal type rather than filling SUPPRESS FORM FEED AT CLOSE for every single printer you configure.&lt;br /&gt;
&lt;br /&gt;
The same extra page issues apply to Zebra printers as well, except over there they may manifest as extra labels if IOF is configured to send a label feed command (^PH or ~PH). If IOF is configured to be a &#039;#&#039;, it will have no effect on the Zebra printer.&lt;br /&gt;
&lt;br /&gt;
== How to specify a Subtype? ==&lt;br /&gt;
Normally, subtypes are configured once per device. When you set up a printer in the DEVICE file, you populate the subtype in the subtype field.&lt;br /&gt;
&lt;br /&gt;
However, you can override subtype selection on a job basis, by using this syntax on the Device prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICE: printer_name;subtype&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you type partial matches, the device driver (^%ZIS) is going to list for you all partial matches for you to choose form. That&#039;s pretty nice since I never remember what subtypes I have beyond them having P-HP at the beginning.&lt;br /&gt;
&lt;br /&gt;
There are variations on this syntax, by the way, that don&#039;t have to do with subtypes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. DEVICE: printer_name;right margin;page length&lt;br /&gt;
2. DEVICE: printer_name;subtype;right margin; page length&lt;br /&gt;
2. DEVICE: ;right margin;page length&lt;br /&gt;
3. DEVICE: ;;page length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can specify custom margins and page lengths. You need to remember that aside from terminal emulators, margins have no effect, as VISTA does not test for them when printing. It does really care about the page length though (see discussion about IOSL above). If a printer name isn&#039;t specified, the home device is assumed.&lt;br /&gt;
&lt;br /&gt;
Novice power users type &#039;;;99999&#039; to print a report without page breaks on the terminal emulator, without understanding what it means. The variations above should tell you: print to the home device to an infinite length. Of note, $Y on Cache wraps at the unsigned int16 limit (32767); therefore, testing if $Y is greater than IOSL when IOSL is greater than 32767 (in my last example, it&#039;s 99999) will always return false, causing page breaks to never be issued. As far as I know, GT.M does not wrap $Y, so you may have to give it gigantic page lengths; although, in practice, I don&#039;t remember having encountered that problem. It&#039;s possible there is something in ^%ZIS4 that I missed regarding that.&lt;br /&gt;
&lt;br /&gt;
== Common Subtypes in VISTA ==&lt;br /&gt;
Here are the most common subtypes in VISTA (standardized for Unices; you will need to remove $C(27),&amp;quot;&amp;amp;k2G&amp;quot; on Windows Servers):&lt;br /&gt;
&lt;br /&gt;
NB: CPI = Characters Per Inch; LPI = Lines Per Inch&lt;br /&gt;
=== PCL Subtypes ===&lt;br /&gt;
==== PCL5 Quick Reference ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*27,&amp;quot;E&amp;quot;/$C(27,69) - Reset&lt;br /&gt;
*27,&amp;quot;&amp;amp;l0O&amp;quot; - Portrait / *27,&amp;quot;&amp;amp;l1O&amp;quot; - Landscape&lt;br /&gt;
*27,&amp;quot;&amp;amp;l3E&amp;quot; - Top Margin is 3 lines&lt;br /&gt;
*27,&amp;quot;&amp;amp;a5L&amp;quot; - Left Margin is 5 columns&lt;br /&gt;
*27,&amp;quot;&amp;amp;k2G&amp;quot; - Line endings are LF. Default Line endings are CRLF (unless overridden in printer settings).&lt;br /&gt;
*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; - Primary &#039;(s&#039; font is fixed pitch, 12 cpi, upright (not italic), not bold, and is the Courier Font (#4099).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 12 CPI 6 LPI ====&lt;br /&gt;
This is THE MOST COMMON subtype to use. Most reports in VISTA print on this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 56&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====  Landscape Letter 14 CPI 6 LPI ====&lt;br /&gt;
This is the second most common subtype. Any menu option that says it needs 132 characters will need to use this subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132          RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 45&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p14h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 17 CPI 7 LPI (MARs and BCMA Med Log) ====&lt;br /&gt;
This is the (theoretically) third most commonly used subtype. It&#039;s only used for specific reports. It&#039;s also known as a condensed print subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128           RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;(s0p17h9v0s0b4099T&amp;quot;,*27,&lt;br /&gt;
&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Landscape Letter 22 CPI 12 LPI ====&lt;br /&gt;
This is the subtype that will take the most amount of text; it&#039;s ideal to print a lot of data from Fileman, for example. It&#039;s also known as the condensed landscape print subtype. It&#039;s not commonly used except by Fileman power users.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228         RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p22h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot;               W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Legal 12 CPI 6 LPI ====&lt;br /&gt;
This is not commonly used; I just created this because I thought it may it come in useful for some users.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
NAME: P-HP-LGL-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 74&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Greensheet ====&lt;br /&gt;
If you don&#039;t know what a green sheet is, then skip this. It&#039;s here for those who want it. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-GREENSHEET      RIGHT MARGIN: 100&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l0O&amp;quot;,*27,&amp;quot;&amp;amp;l4H&amp;quot;,*27,&amp;quot;&amp;amp;l1E&amp;quot;,*27,&amp;quot;(s0p&amp;quot;&lt;br /&gt;
_$S($G(PSDCPI)=10:&amp;quot;10h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10H&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12H&amp;quot;&lt;br /&gt;
  DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
  DEFAULT LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l8C&amp;quot;&lt;br /&gt;
  X LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l12C&amp;quot;&lt;br /&gt;
  BAR CODE OFF: &amp;quot;*&amp;quot;_$C(27)_&amp;quot;&amp;amp;l0O&amp;quot;_$C(27)_&amp;quot;(8U&amp;quot;_$C(27)_&amp;quot;(s0p&amp;quot;_$S($G(PSDCPI)=10:&amp;quot;1&lt;br /&gt;
0h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot;&lt;br /&gt;
  BAR CODE ON: $S($D(PSDX2):$C(27)_&amp;quot;*p&amp;quot;_(PSDX2-1*300+200)_&amp;quot;y*p&amp;quot;_(PSDX1-1*810+38)&lt;br /&gt;
_&amp;quot;X&amp;quot;,1:&amp;quot;&amp;quot;)_$C(27)_&amp;quot;(0Y&amp;quot;_$C(27)_&amp;quot;(s0p8.1h12v0s0b0T*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Outpatient Label Printer ====&lt;br /&gt;
This one is a bit specialized. This is normally set-up by running routines (in this sequence) ^PSOLLU2, ^PSOLLU3, ^PSOLLU4. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HPLJ4SI-P12                     SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 57                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;&lt;br /&gt;
 W $C(27),&amp;quot;&amp;amp;k2G&amp;quot; S $X=0                 DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: ACI&lt;br /&gt;
  FULL NAME: ADDRESS CHANGE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F12&amp;quot;,PSOX=1210,PSOY=700,PSOFY=1270&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: ALI&lt;br /&gt;
  FULL NAME: ALLERGY SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=1350,PSOYI=50,PSOYM=2700&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: AWI&lt;br /&gt;
  FULL NAME: ALLERGY WARNING INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: BLB&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BODY INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSODX=275,PSOY=140,PSOYI=40,PSOYM=379,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: BLBC&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(s1p10.4v4,12b4,12s24670T&amp;quot;,$C(27),&amp;quot;&amp;amp;a90P&amp;quot;,$C(27),&amp;quot;*p36&lt;br /&gt;
50x1000Y&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: BLF&lt;br /&gt;
  FULL NAME: BOTTLE LABEL FOOTER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSODY=460,PSOX=0,PSOCX=280,PSOQY=550,PSOTY=600,PSOFONT=&amp;quot;F10&amp;quot;,P&lt;br /&gt;
SOQFONT=&amp;quot;F8&amp;quot;,PSODFONT=&amp;quot;F9&amp;quot;,PSOTFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 7                               CTRL CODE ABBREVIATION: BLH&lt;br /&gt;
  FULL NAME: BOTTLE LABEL HEADER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=100,PSOY=50,PSOYI=30,PSOFONT=&amp;quot;F9&amp;quot;&lt;br /&gt;
NUMBER: 8                               CTRL CODE ABBREVIATION: CDII&lt;br /&gt;
  FULL NAME: CRITICAL DRUG INTERACTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 9                               CTRL CODE ABBREVIATION: CNI&lt;br /&gt;
  FULL NAME: COPAY NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOX=1210,PSOYM=3950,PSOFONT=&amp;quot;F10&amp;quot;,PSOYI=50&lt;br /&gt;
NUMBER: 10                              CTRL CODE ABBREVIATION: EBLBC&lt;br /&gt;
  FULL NAME: END OF BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;,$C(27),&amp;quot;&amp;amp;a0P&amp;quot;,!&lt;br /&gt;
NUMBER: 11                              CTRL CODE ABBREVIATION: EBT&lt;br /&gt;
  FULL NAME: END OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(8U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;,!&lt;br /&gt;
NUMBER: 12                              CTRL CODE ABBREVIATION: F10&lt;br /&gt;
  FULL NAME: TEN POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 13                              CTRL CODE ABBREVIATION: F10B&lt;br /&gt;
  FULL NAME: TEN POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 14                              CTRL CODE ABBREVIATION: F12&lt;br /&gt;
  FULL NAME: TWELVE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 15                              CTRL CODE ABBREVIATION: F12B&lt;br /&gt;
  FULL NAME: 12 POINT FONT BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 16                              CTRL CODE ABBREVIATION: F6&lt;br /&gt;
  FULL NAME: SIX POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 17                              CTRL CODE ABBREVIATION: F6B&lt;br /&gt;
  FULL NAME: SIX POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 18                              CTRL CODE ABBREVIATION: F8&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 19                              CTRL CODE ABBREVIATION: F8B&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 20                              CTRL CODE ABBREVIATION: F9&lt;br /&gt;
  FULL NAME: NINE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 21                              CTRL CODE ABBREVIATION: F9B&lt;br /&gt;
  FULL NAME: NINE POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 22                              CTRL CODE ABBREVIATION: FDU&lt;br /&gt;
  FULL NAME: FONT DISABLE UNDERLINE     CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d@&amp;quot;&lt;br /&gt;
NUMBER: 23                              CTRL CODE ABBREVIATION: FWU&lt;br /&gt;
  FULL NAME: FONT WITH UNDERLINE        CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d0D&amp;quot;&lt;br /&gt;
NUMBER: 24                              CTRL CODE ABBREVIATION: LL&lt;br /&gt;
  FULL NAME: LASER LABEL                CONTROL CODE: Q&lt;br /&gt;
NUMBER: 25                              CTRL CODE ABBREVIATION: LLI&lt;br /&gt;
  FULL NAME: LASER LABEL INIT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;&amp;amp;r1F&amp;quot;,$C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;u300D&amp;quot;,$C(27),&lt;br /&gt;
&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0E&amp;quot;,!&lt;br /&gt;
NUMBER: 26                              CTRL CODE ABBREVIATION: MLI&lt;br /&gt;
  FULL NAME: MAILING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=175,PSOYI=50&lt;br /&gt;
NUMBER: 27                              CTRL CODE ABBREVIATION: NR&lt;br /&gt;
  FULL NAME: NORMAL ROTATION            CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a0P&amp;quot;&lt;br /&gt;
NUMBER: 28                              CTRL CODE ABBREVIATION: PFDI&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=690,PSOYI=40,PSOYM=969&lt;br /&gt;
NUMBER: 29                              CTRL CODE ABBREVIATION: PFDQ&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT QUANTITY&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOCX=200,PSOY=970,PSOYI=50,PSOQFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 30                              CTRL CODE ABBREVIATION: PFDT&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT TRAILER&lt;br /&gt;
  CONTROL CODE: S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=50,PSOTFONT=&amp;quot;F9&lt;br /&gt;
&amp;quot;,PSOBY=1280&lt;br /&gt;
NUMBER: 31                              CTRL CODE ABBREVIATION: PFDW&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT WARNING&lt;br /&gt;
  CONTROL CODE: S PSOY=1258,PSOX=660,PSOYI=30,PSOFONT=&amp;quot;F8&amp;quot;,PSOYM=1329&lt;br /&gt;
NUMBER: 32                              CTRL CODE ABBREVIATION: PFI&lt;br /&gt;
  FULL NAME: PATIENT FILL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=710,PSOYI=45,PSOHFONT=&amp;quot;F12&amp;quot;,PSOBY&lt;br /&gt;
I=100&lt;br /&gt;
NUMBER: 33                              CTRL CODE ABBREVIATION: PII&lt;br /&gt;
  FULL NAME: PATIENT INSTRUCTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1210,PSOY=760,PSOFONT=&amp;quot;F12&amp;quot;&lt;br /&gt;
NUMBER: 34                              CTRL CODE ABBREVIATION: PMII&lt;br /&gt;
  FULL NAME: PMI SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;,PSOYM=3899&lt;br /&gt;
NUMBER: 35                              CTRL CODE ABBREVIATION: RMI&lt;br /&gt;
  FULL NAME: RETURN MAIL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=35,PSORYI=40,PSOHYI&lt;br /&gt;
=40,PSOTFONT=&amp;quot;F8&amp;quot;,PSOTY=550&lt;br /&gt;
NUMBER: 36                              CTRL CODE ABBREVIATION: RNI&lt;br /&gt;
  FULL NAME: REFILL NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOYI=50,PSOYM=3950&lt;br /&gt;
NUMBER: 37                              CTRL CODE ABBREVIATION: RPI&lt;br /&gt;
  FULL NAME: REFILL PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=65,PSOTYI=50,PSOLX=0,PSORX=1210,PSOY=1350&lt;br /&gt;
,PSOYM=3650,PSOXI=90,PSOSYI=135&lt;br /&gt;
NUMBER: 38                              CTRL CODE ABBREVIATION: RT&lt;br /&gt;
  FULL NAME: ROTATE TEXT                CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a90P&amp;quot;&lt;br /&gt;
NUMBER: 39                              CTRL CODE ABBREVIATION: SBT&lt;br /&gt;
  FULL NAME: START OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;,$C(27),&amp;quot;(s1p14&lt;br /&gt;
.4v6,18b6,18s24670T&amp;quot;&lt;br /&gt;
NUMBER: 40                              CTRL CODE ABBREVIATION: SPI&lt;br /&gt;
  FULL NAME: SUSPENSE PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=1350,PSOYI=50,PSOCX=1775,PSOYM=27&lt;br /&gt;
00&lt;br /&gt;
NUMBER: 41                              CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: START OF TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;&lt;br /&gt;
NUMBER: 42                              CTRL CODE ABBREVIATION: WLI&lt;br /&gt;
  FULL NAME: WARNING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1050,PSOY=55&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zebra Subtypes ===&lt;br /&gt;
For whatever reason, all commercial implementations I have worked on used Zebra printers for labels. One IMPORTANT aspect to note is that the existing subtypes in VISTA are written for 203 dpi Zebra printers. If you print them on 300 dpi Zebra printers, they will look shrunk. In the subtypes below, Right Margin, Page Length, and Back Space have to be filled out because they are required fields, but the software doesn&#039;t use them.&lt;br /&gt;
&lt;br /&gt;
==== ZPL II Commands Cheat Sheet ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
^XA - Start Label&lt;br /&gt;
^XZ - End Label&lt;br /&gt;
^LL - Label Length (Height)&lt;br /&gt;
^PW - Print Width&lt;br /&gt;
^CF - Set default Font&lt;br /&gt;
^LH - Label Home (Set a specific point to be the 0,0 coordinate for printing)&lt;br /&gt;
^A - Specify a font for the next ^FD (Field Definition). Resets to ^CF font after ^FD.&lt;br /&gt;
^CI - Change font encoding. 0 is USA-1, 28 is UTF-8, 30 is UTF-16 LE&lt;br /&gt;
^FR - Field Reverse Print; like reverse video for monitors&lt;br /&gt;
^FD - Field Data: contains what to print&lt;br /&gt;
^FS - Field Separator: End field data&lt;br /&gt;
^FB - Field Block: Allows you to print text with word wrapping&lt;br /&gt;
^BY - Bar Code Field Default: sets size of barcode.&lt;br /&gt;
^B3 - Code 39 barcode&lt;br /&gt;
^BC - Code 128 barcode&lt;br /&gt;
^BX - Datamatrix Barcode&lt;br /&gt;
^BQ - QR Barcode&lt;br /&gt;
^PH - Form Feed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Lab Label ====&lt;br /&gt;
This is 1&amp;quot; x 2&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-LAB&lt;br /&gt;
  RIGHT MARGIN: 132                     FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 64                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW406.4^CFD,18,10^LH25,10&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W &amp;quot;^XZ&amp;quot;                DESCRIPTION: Zebra Lab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy BCMA Label ====&lt;br /&gt;
This is 1&amp;quot; x 3.5&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-PHARM-BCMA                &lt;br /&gt;
  RIGHT MARGIN: 80                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 10                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW711.2^CFD,18,10^LH15,25^XZ&amp;quot;&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: SL&lt;br /&gt;
  FULL NAME: Start Label                CONTROL CODE: W !,&amp;quot;^XA&amp;quot;,!,&amp;quot;^LH0,0^FS&amp;quot;&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: EL&lt;br /&gt;
  FULL NAME: End Label                  CONTROL CODE: W !,&amp;quot;^XZ&amp;quot;&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: EB&lt;br /&gt;
  FULL NAME: End Barcode&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^FO20,150^A0N,30,20^CI13^FR^FD&amp;quot;_TEXT_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: SB&lt;br /&gt;
  FULL NAME: Start Barcode&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^BY1,2.0^FO650,25^BXN,3,200^FD&amp;quot;_PSBBAR_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: Start Text&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^FO&amp;quot;_PSBTYPE_&amp;quot;^A0N,30,20^CI13^FR^FD&amp;quot;_TEXT_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: STF&lt;br /&gt;
  FULL NAME: Start Text Field&lt;br /&gt;
  CONTROL CODE: S PSBTYPE=$S(PSBTLE=&amp;quot;PSBDRUG&amp;quot;:&amp;quot;20,25&amp;quot;,PSBTLE=&amp;quot;PSBDOSE&amp;quot;:&amp;quot;20,60^FB&lt;br /&gt;
320,5&amp;quot;,PSBTLE=&amp;quot;PSBNAME&amp;quot;:&amp;quot;350,60&amp;quot;,PSBTLE=&amp;quot;PSBWARD&amp;quot;:&amp;quot;350,90&amp;quot;,PSBTLE=&amp;quot;PSBLOT&amp;quot;:&amp;quot;350,&lt;br /&gt;
120&amp;quot;,PSBTLE=&amp;quot;PSBEXP&amp;quot;:&amp;quot;350,150&amp;quot;,PSBTLE=&amp;quot;PSBMFG&amp;quot;:&amp;quot;500,150&amp;quot;,PSBTLE=&amp;quot;PSBFCB&amp;quot;:&amp;quot;350,18&lt;br /&gt;
0&amp;quot;,1:&amp;quot;0,0&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Unit Dose Label (vxVistA only) ====&lt;br /&gt;
VA VistA uses a dot matrix printer printing on a sheet of 1&amp;quot; x 3.5&amp;quot; x 2 columns.&lt;br /&gt;
vxVistA was written to use Unit Dose labels. This is 1&amp;quot; x 3.5&amp;quot; single column.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-PHARM-UD&lt;br /&gt;
  RIGHT MARGIN: 132                     FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 64                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW711.2^CFD,18,10^LH15,25^XZ&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Support for Advanced Subtype Specifiers ==&lt;br /&gt;
If you look at [http://www.va.gov/vdl/documents/Infrastructure/Kernel/krn8_0sm.pdf|the kernel system management guide], you will notice that you can use a rather obtuse syntax to customize your output on a print by print basis. E.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LASER;P-LASER-LANDSCAPE;/M132L100P16BQ2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
M stands for right margin, here set to 132; L stands for page length, here 100; P stands for pitch, here 16, can only be 10, 12 or 16; B stands for Bold; and Q stands for Quality, taking in 0, 1 or 2, here set to 2.&lt;br /&gt;
&lt;br /&gt;
How to set up a device to support this isn&#039;t documented anywhere in the Kernel Manuals; I figured it out eventually by reading the %ZIS source code. You need to set up these fields as follows for each subtype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10h&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
  HIGH INTENSITY (BOLD): $C(27)_&amp;quot;(s3b&amp;quot;  LOW INTENSITY (UNBOLD): $C(27)_&amp;quot;(s-3b&amp;quot;&lt;br /&gt;
  NORMAL INTENSITY (RESET): $C(27)_&amp;quot;(s0b&amp;quot;&lt;br /&gt;
  16 PITCH: $C(27)_&amp;quot;(s16h&amp;quot;              DEFAULT PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only thing you may have to vary between different subtypes is what is considered a default pitch. Here it is 12, but it can be different. Reading the code, I don&#039;t believe that setting the default pitch matters since the printer gets reset every single time a job is sent, discarding the last pitch sent. I don&#039;t support &#039;Q&#039; in the configuration above, so it has no effect; that&#039;s because &#039;Q&#039; is nonsensical when using laser printers. It had a use back in the dot-matrix days.&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17174</id>
		<title>VISTA Printing Printer Subtypes</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17174"/>
		<updated>2016-10-03T21:19:11Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Pharmacy Unit Dose Label (vxVistA only) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= VISTA Subtypes =&lt;br /&gt;
&#039;&#039;Written by Sam Habiel&#039;&#039;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is a Subtype ==&lt;br /&gt;
A subtype (stored in file #3.2 TERMINAL TYPE) is an entry associated with each device that tells the device how to handle special non-standard situations; plus some base characteristics. With printers, typically a subtype has two fields populated: Open Execute and Close Execute, in addition to Right Margin, Form Feed, Page Length, and Back Space. The Open Execute resets the printer, sets the page orientation, sets the top and left margins, and sets the font size. The close execute sets the variable IONOFF to an empty string (effectively defining it in the symbol table), and sends a reset to the printer. Right Margin and Back Space aren&#039;t used with printers; Form Feed goes into the M variable IOF, Page Length goes into the M variable IOSL (&amp;quot;IO Screen Length&amp;quot;) determines how many lines are to be printed on each page before VISTA sends an IOF to go to the next page. That&#039;s important to keep in mind since the number of lines that VISTA prints needs to match how many lines are available on the page, otherwise the printer will either spit an extra page containing the extra lines or it will clip the output, depending on whether you specified how many lines are to be printed in PCL. The subtypes below don&#039;t specify how many lines to print, so the former behavior will happen with them. The solution is to decrease page length.&lt;br /&gt;
&lt;br /&gt;
The reason IONOFF is needed is that by default VISTA will send an extra page following each print out; because it was developed in the days of dot-matrix printers, where the extra page separated jobs. The days of dot-matrix printing are practically over; most printers used today are inkjet or laser. Typically we don&#039;t want an extra page at the end. You may be lead to believe that IONOFF is enough; however, most reports in VISTA have hardcoded extra pages at the beginning or end. I was told there was going to be a project in the late 90&#039;s to make sure all reports relied on the device handler for printing separator pages, but that never happened.&lt;br /&gt;
&lt;br /&gt;
There is a field in the device file called &amp;quot;SUPPRESS FORM FEED AT CLOSE&amp;quot;. This field does the exact same thing as setting IONOFF in the Close Execute in the terminal type. In general, I recommend setting IONOFF in the terminal type rather than filling SUPPRESS FORM FEED AT CLOSE for every single printer you configure.&lt;br /&gt;
&lt;br /&gt;
The same extra page issues apply to Zebra printers as well, except over there they may manifest as extra labels if IOF is configured to send a label feed command (^PH or ~PH). If IOF is configured to be a &#039;#&#039;, it will have no effect on the Zebra printer.&lt;br /&gt;
&lt;br /&gt;
== How to specify a Subtype? ==&lt;br /&gt;
Normally, subtypes are configured once per device. When you set up a printer in the DEVICE file, you populate the subtype in the subtype field.&lt;br /&gt;
&lt;br /&gt;
However, you can override subtype selection on a job basis, by using this syntax on the Device prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICE: printer_name;subtype&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you type partial matches, the device driver (^%ZIS) is going to list for you all partial matches for you to choose form. That&#039;s pretty nice since I never remember what subtypes I have beyond them having P-HP at the beginning.&lt;br /&gt;
&lt;br /&gt;
There are variations on this syntax, by the way, that don&#039;t have to do with subtypes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. DEVICE: printer_name;right margin;page length&lt;br /&gt;
2. DEVICE: printer_name;subtype;right margin; page length&lt;br /&gt;
2. DEVICE: ;right margin;page length&lt;br /&gt;
3. DEVICE: ;;page length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can specify custom margins and page lengths. You need to remember that aside from terminal emulators, margins have no effect, as VISTA does not test for them when printing. It does really care about the page length though (see discussion about IOSL above). If a printer name isn&#039;t specified, the home device is assumed.&lt;br /&gt;
&lt;br /&gt;
Novice power users type &#039;;;99999&#039; to print a report without page breaks on the terminal emulator, without understanding what it means. The variations above should tell you: print to the home device to an infinite length. Of note, $Y on Cache wraps at the unsigned int16 limit (32767); therefore, testing if $Y is greater than IOSL when IOSL is greater than 32767 (in my last example, it&#039;s 99999) will always return false, causing page breaks to never be issued. As far as I know, GT.M does not wrap $Y, so you may have to give it gigantic page lengths; although, in practice, I don&#039;t remember having encountered that problem. It&#039;s possible there is something in ^%ZIS4 that I missed regarding that.&lt;br /&gt;
&lt;br /&gt;
== Common Subtypes in VISTA ==&lt;br /&gt;
Here are the most common subtypes in VISTA (standardized for Unices; you will need to remove $C(27),&amp;quot;&amp;amp;k2G&amp;quot; on Windows Servers):&lt;br /&gt;
&lt;br /&gt;
NB: CPI = Characters Per Inch; LPI = Lines Per Inch&lt;br /&gt;
=== PCL Subtypes ===&lt;br /&gt;
==== PCL5 Quick Reference ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*27,&amp;quot;E&amp;quot;/$C(27,69) - Reset&lt;br /&gt;
*27,&amp;quot;&amp;amp;l0O&amp;quot; - Portrait / *27,&amp;quot;&amp;amp;l1O&amp;quot; - Landscape&lt;br /&gt;
*27,&amp;quot;&amp;amp;l3E&amp;quot; - Top Margin is 3 lines&lt;br /&gt;
*27,&amp;quot;&amp;amp;a5L&amp;quot; - Left Margin is 5 columns&lt;br /&gt;
*27,&amp;quot;&amp;amp;k2G&amp;quot; - Line endings are LF. Default Line endings are CRLF (unless overridden in printer settings).&lt;br /&gt;
*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; - Primary &#039;(s&#039; font is fixed pitch, 12 cpi, upright (not italic), not bold, and is the Courier Font (#4099).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 12 CPI 6 LPI ====&lt;br /&gt;
This is THE MOST COMMON subtype to use. Most reports in VISTA print on this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 56&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====  Landscape Letter 14 CPI 6 LPI ====&lt;br /&gt;
This is the second most common subtype. Any menu option that says it needs 132 characters will need to use this subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132          RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 45&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p14h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 17 CPI 7 LPI (MARs and BCMA Med Log) ====&lt;br /&gt;
This is the (theoretically) third most commonly used subtype. It&#039;s only used for specific reports. It&#039;s also known as a condensed print subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128           RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;(s0p17h9v0s0b4099T&amp;quot;,*27,&lt;br /&gt;
&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Landscape Letter 22 CPI 12 LPI ====&lt;br /&gt;
This is the subtype that will take the most amount of text; it&#039;s ideal to print a lot of data from Fileman, for example. It&#039;s also known as the condensed landscape print subtype. It&#039;s not commonly used except by Fileman power users.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228         RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p22h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot;               W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Legal 12 CPI 6 LPI ====&lt;br /&gt;
This is not commonly used; I just created this because I thought it may it come in useful for some users.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
NAME: P-HP-LGL-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 74&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Greensheet ====&lt;br /&gt;
If you don&#039;t know what a green sheet is, then skip this. It&#039;s here for those who want it. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-GREENSHEET      RIGHT MARGIN: 100&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l0O&amp;quot;,*27,&amp;quot;&amp;amp;l4H&amp;quot;,*27,&amp;quot;&amp;amp;l1E&amp;quot;,*27,&amp;quot;(s0p&amp;quot;&lt;br /&gt;
_$S($G(PSDCPI)=10:&amp;quot;10h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10H&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12H&amp;quot;&lt;br /&gt;
  DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
  DEFAULT LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l8C&amp;quot;&lt;br /&gt;
  X LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l12C&amp;quot;&lt;br /&gt;
  BAR CODE OFF: &amp;quot;*&amp;quot;_$C(27)_&amp;quot;&amp;amp;l0O&amp;quot;_$C(27)_&amp;quot;(8U&amp;quot;_$C(27)_&amp;quot;(s0p&amp;quot;_$S($G(PSDCPI)=10:&amp;quot;1&lt;br /&gt;
0h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot;&lt;br /&gt;
  BAR CODE ON: $S($D(PSDX2):$C(27)_&amp;quot;*p&amp;quot;_(PSDX2-1*300+200)_&amp;quot;y*p&amp;quot;_(PSDX1-1*810+38)&lt;br /&gt;
_&amp;quot;X&amp;quot;,1:&amp;quot;&amp;quot;)_$C(27)_&amp;quot;(0Y&amp;quot;_$C(27)_&amp;quot;(s0p8.1h12v0s0b0T*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Outpatient Label Printer ====&lt;br /&gt;
This one is a bit specialized. This is normally set-up by running routines (in this sequence) ^PSOLLU2, ^PSOLLU3, ^PSOLLU4. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HPLJ4SI-P12                     SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 57                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;&lt;br /&gt;
 W $C(27),&amp;quot;&amp;amp;k2G&amp;quot; S $X=0                 DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: ACI&lt;br /&gt;
  FULL NAME: ADDRESS CHANGE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F12&amp;quot;,PSOX=1210,PSOY=700,PSOFY=1270&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: ALI&lt;br /&gt;
  FULL NAME: ALLERGY SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=1350,PSOYI=50,PSOYM=2700&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: AWI&lt;br /&gt;
  FULL NAME: ALLERGY WARNING INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: BLB&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BODY INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSODX=275,PSOY=140,PSOYI=40,PSOYM=379,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: BLBC&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(s1p10.4v4,12b4,12s24670T&amp;quot;,$C(27),&amp;quot;&amp;amp;a90P&amp;quot;,$C(27),&amp;quot;*p36&lt;br /&gt;
50x1000Y&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: BLF&lt;br /&gt;
  FULL NAME: BOTTLE LABEL FOOTER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSODY=460,PSOX=0,PSOCX=280,PSOQY=550,PSOTY=600,PSOFONT=&amp;quot;F10&amp;quot;,P&lt;br /&gt;
SOQFONT=&amp;quot;F8&amp;quot;,PSODFONT=&amp;quot;F9&amp;quot;,PSOTFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 7                               CTRL CODE ABBREVIATION: BLH&lt;br /&gt;
  FULL NAME: BOTTLE LABEL HEADER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=100,PSOY=50,PSOYI=30,PSOFONT=&amp;quot;F9&amp;quot;&lt;br /&gt;
NUMBER: 8                               CTRL CODE ABBREVIATION: CDII&lt;br /&gt;
  FULL NAME: CRITICAL DRUG INTERACTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 9                               CTRL CODE ABBREVIATION: CNI&lt;br /&gt;
  FULL NAME: COPAY NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOX=1210,PSOYM=3950,PSOFONT=&amp;quot;F10&amp;quot;,PSOYI=50&lt;br /&gt;
NUMBER: 10                              CTRL CODE ABBREVIATION: EBLBC&lt;br /&gt;
  FULL NAME: END OF BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;,$C(27),&amp;quot;&amp;amp;a0P&amp;quot;,!&lt;br /&gt;
NUMBER: 11                              CTRL CODE ABBREVIATION: EBT&lt;br /&gt;
  FULL NAME: END OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(8U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;,!&lt;br /&gt;
NUMBER: 12                              CTRL CODE ABBREVIATION: F10&lt;br /&gt;
  FULL NAME: TEN POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 13                              CTRL CODE ABBREVIATION: F10B&lt;br /&gt;
  FULL NAME: TEN POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 14                              CTRL CODE ABBREVIATION: F12&lt;br /&gt;
  FULL NAME: TWELVE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 15                              CTRL CODE ABBREVIATION: F12B&lt;br /&gt;
  FULL NAME: 12 POINT FONT BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 16                              CTRL CODE ABBREVIATION: F6&lt;br /&gt;
  FULL NAME: SIX POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 17                              CTRL CODE ABBREVIATION: F6B&lt;br /&gt;
  FULL NAME: SIX POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 18                              CTRL CODE ABBREVIATION: F8&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 19                              CTRL CODE ABBREVIATION: F8B&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 20                              CTRL CODE ABBREVIATION: F9&lt;br /&gt;
  FULL NAME: NINE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 21                              CTRL CODE ABBREVIATION: F9B&lt;br /&gt;
  FULL NAME: NINE POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 22                              CTRL CODE ABBREVIATION: FDU&lt;br /&gt;
  FULL NAME: FONT DISABLE UNDERLINE     CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d@&amp;quot;&lt;br /&gt;
NUMBER: 23                              CTRL CODE ABBREVIATION: FWU&lt;br /&gt;
  FULL NAME: FONT WITH UNDERLINE        CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d0D&amp;quot;&lt;br /&gt;
NUMBER: 24                              CTRL CODE ABBREVIATION: LL&lt;br /&gt;
  FULL NAME: LASER LABEL                CONTROL CODE: Q&lt;br /&gt;
NUMBER: 25                              CTRL CODE ABBREVIATION: LLI&lt;br /&gt;
  FULL NAME: LASER LABEL INIT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;&amp;amp;r1F&amp;quot;,$C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;u300D&amp;quot;,$C(27),&lt;br /&gt;
&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0E&amp;quot;,!&lt;br /&gt;
NUMBER: 26                              CTRL CODE ABBREVIATION: MLI&lt;br /&gt;
  FULL NAME: MAILING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=175,PSOYI=50&lt;br /&gt;
NUMBER: 27                              CTRL CODE ABBREVIATION: NR&lt;br /&gt;
  FULL NAME: NORMAL ROTATION            CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a0P&amp;quot;&lt;br /&gt;
NUMBER: 28                              CTRL CODE ABBREVIATION: PFDI&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=690,PSOYI=40,PSOYM=969&lt;br /&gt;
NUMBER: 29                              CTRL CODE ABBREVIATION: PFDQ&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT QUANTITY&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOCX=200,PSOY=970,PSOYI=50,PSOQFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 30                              CTRL CODE ABBREVIATION: PFDT&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT TRAILER&lt;br /&gt;
  CONTROL CODE: S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=50,PSOTFONT=&amp;quot;F9&lt;br /&gt;
&amp;quot;,PSOBY=1280&lt;br /&gt;
NUMBER: 31                              CTRL CODE ABBREVIATION: PFDW&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT WARNING&lt;br /&gt;
  CONTROL CODE: S PSOY=1258,PSOX=660,PSOYI=30,PSOFONT=&amp;quot;F8&amp;quot;,PSOYM=1329&lt;br /&gt;
NUMBER: 32                              CTRL CODE ABBREVIATION: PFI&lt;br /&gt;
  FULL NAME: PATIENT FILL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=710,PSOYI=45,PSOHFONT=&amp;quot;F12&amp;quot;,PSOBY&lt;br /&gt;
I=100&lt;br /&gt;
NUMBER: 33                              CTRL CODE ABBREVIATION: PII&lt;br /&gt;
  FULL NAME: PATIENT INSTRUCTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1210,PSOY=760,PSOFONT=&amp;quot;F12&amp;quot;&lt;br /&gt;
NUMBER: 34                              CTRL CODE ABBREVIATION: PMII&lt;br /&gt;
  FULL NAME: PMI SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;,PSOYM=3899&lt;br /&gt;
NUMBER: 35                              CTRL CODE ABBREVIATION: RMI&lt;br /&gt;
  FULL NAME: RETURN MAIL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=35,PSORYI=40,PSOHYI&lt;br /&gt;
=40,PSOTFONT=&amp;quot;F8&amp;quot;,PSOTY=550&lt;br /&gt;
NUMBER: 36                              CTRL CODE ABBREVIATION: RNI&lt;br /&gt;
  FULL NAME: REFILL NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOYI=50,PSOYM=3950&lt;br /&gt;
NUMBER: 37                              CTRL CODE ABBREVIATION: RPI&lt;br /&gt;
  FULL NAME: REFILL PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=65,PSOTYI=50,PSOLX=0,PSORX=1210,PSOY=1350&lt;br /&gt;
,PSOYM=3650,PSOXI=90,PSOSYI=135&lt;br /&gt;
NUMBER: 38                              CTRL CODE ABBREVIATION: RT&lt;br /&gt;
  FULL NAME: ROTATE TEXT                CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a90P&amp;quot;&lt;br /&gt;
NUMBER: 39                              CTRL CODE ABBREVIATION: SBT&lt;br /&gt;
  FULL NAME: START OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;,$C(27),&amp;quot;(s1p14&lt;br /&gt;
.4v6,18b6,18s24670T&amp;quot;&lt;br /&gt;
NUMBER: 40                              CTRL CODE ABBREVIATION: SPI&lt;br /&gt;
  FULL NAME: SUSPENSE PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=1350,PSOYI=50,PSOCX=1775,PSOYM=27&lt;br /&gt;
00&lt;br /&gt;
NUMBER: 41                              CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: START OF TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;&lt;br /&gt;
NUMBER: 42                              CTRL CODE ABBREVIATION: WLI&lt;br /&gt;
  FULL NAME: WARNING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1050,PSOY=55&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zebra Subtypes ===&lt;br /&gt;
For whatever reason, all commercial implementations I have worked on used Zebra printers for labels. One IMPORTANT aspect to note is that the existing subtypes in VISTA are written for 203 dpi Zebra printers. If you print them on 300 dpi Zebra printers, they will look shrunk. In the subtypes below, Right Margin, Page Length, and Back Space have to be filled out because they are required fields, but the software doesn&#039;t use them.&lt;br /&gt;
&lt;br /&gt;
==== ZPL II Commands ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lab Label ====&lt;br /&gt;
This is 1&amp;quot; x 2&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-LAB&lt;br /&gt;
  RIGHT MARGIN: 132                     FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 64                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW406.4^CFD,18,10^LH25,10&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W &amp;quot;^XZ&amp;quot;                DESCRIPTION: Zebra Lab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy BCMA Label ====&lt;br /&gt;
This is 1&amp;quot; x 3.5&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-PHARM-BCMA                &lt;br /&gt;
  RIGHT MARGIN: 80                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 10                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW711.2^CFD,18,10^LH15,25^XZ&amp;quot;&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: SL&lt;br /&gt;
  FULL NAME: Start Label                CONTROL CODE: W !,&amp;quot;^XA&amp;quot;,!,&amp;quot;^LH0,0^FS&amp;quot;&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: EL&lt;br /&gt;
  FULL NAME: End Label                  CONTROL CODE: W !,&amp;quot;^XZ&amp;quot;&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: EB&lt;br /&gt;
  FULL NAME: End Barcode&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^FO20,150^A0N,30,20^CI13^FR^FD&amp;quot;_TEXT_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: SB&lt;br /&gt;
  FULL NAME: Start Barcode&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^BY1,2.0^FO650,25^BXN,3,200^FD&amp;quot;_PSBBAR_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: Start Text&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^FO&amp;quot;_PSBTYPE_&amp;quot;^A0N,30,20^CI13^FR^FD&amp;quot;_TEXT_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: STF&lt;br /&gt;
  FULL NAME: Start Text Field&lt;br /&gt;
  CONTROL CODE: S PSBTYPE=$S(PSBTLE=&amp;quot;PSBDRUG&amp;quot;:&amp;quot;20,25&amp;quot;,PSBTLE=&amp;quot;PSBDOSE&amp;quot;:&amp;quot;20,60^FB&lt;br /&gt;
320,5&amp;quot;,PSBTLE=&amp;quot;PSBNAME&amp;quot;:&amp;quot;350,60&amp;quot;,PSBTLE=&amp;quot;PSBWARD&amp;quot;:&amp;quot;350,90&amp;quot;,PSBTLE=&amp;quot;PSBLOT&amp;quot;:&amp;quot;350,&lt;br /&gt;
120&amp;quot;,PSBTLE=&amp;quot;PSBEXP&amp;quot;:&amp;quot;350,150&amp;quot;,PSBTLE=&amp;quot;PSBMFG&amp;quot;:&amp;quot;500,150&amp;quot;,PSBTLE=&amp;quot;PSBFCB&amp;quot;:&amp;quot;350,18&lt;br /&gt;
0&amp;quot;,1:&amp;quot;0,0&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Unit Dose Label (vxVistA only) ====&lt;br /&gt;
VA VistA uses a dot matrix printer printing on a sheet of 1&amp;quot; x 3.5&amp;quot; x 2 columns.&lt;br /&gt;
vxVistA was written to use Unit Dose labels. This is 1&amp;quot; x 3.5&amp;quot; single column.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-PHARM-UD&lt;br /&gt;
  RIGHT MARGIN: 132                     FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 64                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW711.2^CFD,18,10^LH15,25^XZ&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Support for Advanced Subtype Specifiers ==&lt;br /&gt;
If you look at [http://www.va.gov/vdl/documents/Infrastructure/Kernel/krn8_0sm.pdf|the kernel system management guide], you will notice that you can use a rather obtuse syntax to customize your output on a print by print basis. E.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LASER;P-LASER-LANDSCAPE;/M132L100P16BQ2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
M stands for right margin, here set to 132; L stands for page length, here 100; P stands for pitch, here 16, can only be 10, 12 or 16; B stands for Bold; and Q stands for Quality, taking in 0, 1 or 2, here set to 2.&lt;br /&gt;
&lt;br /&gt;
How to set up a device to support this isn&#039;t documented anywhere in the Kernel Manuals; I figured it out eventually by reading the %ZIS source code. You need to set up these fields as follows for each subtype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10h&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
  HIGH INTENSITY (BOLD): $C(27)_&amp;quot;(s3b&amp;quot;  LOW INTENSITY (UNBOLD): $C(27)_&amp;quot;(s-3b&amp;quot;&lt;br /&gt;
  NORMAL INTENSITY (RESET): $C(27)_&amp;quot;(s0b&amp;quot;&lt;br /&gt;
  16 PITCH: $C(27)_&amp;quot;(s16h&amp;quot;              DEFAULT PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only thing you may have to vary between different subtypes is what is considered a default pitch. Here it is 12, but it can be different. Reading the code, I don&#039;t believe that setting the default pitch matters since the printer gets reset every single time a job is sent, discarding the last pitch sent. I don&#039;t support &#039;Q&#039; in the configuration above, so it has no effect; that&#039;s because &#039;Q&#039; is nonsensical when using laser printers. It had a use back in the dot-matrix days.&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17173</id>
		<title>VISTA Printing Printer Subtypes</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17173"/>
		<updated>2016-10-03T21:18:36Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* VISTA Subtypes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= VISTA Subtypes =&lt;br /&gt;
&#039;&#039;Written by Sam Habiel&#039;&#039;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is a Subtype ==&lt;br /&gt;
A subtype (stored in file #3.2 TERMINAL TYPE) is an entry associated with each device that tells the device how to handle special non-standard situations; plus some base characteristics. With printers, typically a subtype has two fields populated: Open Execute and Close Execute, in addition to Right Margin, Form Feed, Page Length, and Back Space. The Open Execute resets the printer, sets the page orientation, sets the top and left margins, and sets the font size. The close execute sets the variable IONOFF to an empty string (effectively defining it in the symbol table), and sends a reset to the printer. Right Margin and Back Space aren&#039;t used with printers; Form Feed goes into the M variable IOF, Page Length goes into the M variable IOSL (&amp;quot;IO Screen Length&amp;quot;) determines how many lines are to be printed on each page before VISTA sends an IOF to go to the next page. That&#039;s important to keep in mind since the number of lines that VISTA prints needs to match how many lines are available on the page, otherwise the printer will either spit an extra page containing the extra lines or it will clip the output, depending on whether you specified how many lines are to be printed in PCL. The subtypes below don&#039;t specify how many lines to print, so the former behavior will happen with them. The solution is to decrease page length.&lt;br /&gt;
&lt;br /&gt;
The reason IONOFF is needed is that by default VISTA will send an extra page following each print out; because it was developed in the days of dot-matrix printers, where the extra page separated jobs. The days of dot-matrix printing are practically over; most printers used today are inkjet or laser. Typically we don&#039;t want an extra page at the end. You may be lead to believe that IONOFF is enough; however, most reports in VISTA have hardcoded extra pages at the beginning or end. I was told there was going to be a project in the late 90&#039;s to make sure all reports relied on the device handler for printing separator pages, but that never happened.&lt;br /&gt;
&lt;br /&gt;
There is a field in the device file called &amp;quot;SUPPRESS FORM FEED AT CLOSE&amp;quot;. This field does the exact same thing as setting IONOFF in the Close Execute in the terminal type. In general, I recommend setting IONOFF in the terminal type rather than filling SUPPRESS FORM FEED AT CLOSE for every single printer you configure.&lt;br /&gt;
&lt;br /&gt;
The same extra page issues apply to Zebra printers as well, except over there they may manifest as extra labels if IOF is configured to send a label feed command (^PH or ~PH). If IOF is configured to be a &#039;#&#039;, it will have no effect on the Zebra printer.&lt;br /&gt;
&lt;br /&gt;
== How to specify a Subtype? ==&lt;br /&gt;
Normally, subtypes are configured once per device. When you set up a printer in the DEVICE file, you populate the subtype in the subtype field.&lt;br /&gt;
&lt;br /&gt;
However, you can override subtype selection on a job basis, by using this syntax on the Device prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICE: printer_name;subtype&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you type partial matches, the device driver (^%ZIS) is going to list for you all partial matches for you to choose form. That&#039;s pretty nice since I never remember what subtypes I have beyond them having P-HP at the beginning.&lt;br /&gt;
&lt;br /&gt;
There are variations on this syntax, by the way, that don&#039;t have to do with subtypes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. DEVICE: printer_name;right margin;page length&lt;br /&gt;
2. DEVICE: printer_name;subtype;right margin; page length&lt;br /&gt;
2. DEVICE: ;right margin;page length&lt;br /&gt;
3. DEVICE: ;;page length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can specify custom margins and page lengths. You need to remember that aside from terminal emulators, margins have no effect, as VISTA does not test for them when printing. It does really care about the page length though (see discussion about IOSL above). If a printer name isn&#039;t specified, the home device is assumed.&lt;br /&gt;
&lt;br /&gt;
Novice power users type &#039;;;99999&#039; to print a report without page breaks on the terminal emulator, without understanding what it means. The variations above should tell you: print to the home device to an infinite length. Of note, $Y on Cache wraps at the unsigned int16 limit (32767); therefore, testing if $Y is greater than IOSL when IOSL is greater than 32767 (in my last example, it&#039;s 99999) will always return false, causing page breaks to never be issued. As far as I know, GT.M does not wrap $Y, so you may have to give it gigantic page lengths; although, in practice, I don&#039;t remember having encountered that problem. It&#039;s possible there is something in ^%ZIS4 that I missed regarding that.&lt;br /&gt;
&lt;br /&gt;
== Common Subtypes in VISTA ==&lt;br /&gt;
Here are the most common subtypes in VISTA (standardized for Unices; you will need to remove $C(27),&amp;quot;&amp;amp;k2G&amp;quot; on Windows Servers):&lt;br /&gt;
&lt;br /&gt;
NB: CPI = Characters Per Inch; LPI = Lines Per Inch&lt;br /&gt;
=== PCL Subtypes ===&lt;br /&gt;
==== PCL5 Quick Reference ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*27,&amp;quot;E&amp;quot;/$C(27,69) - Reset&lt;br /&gt;
*27,&amp;quot;&amp;amp;l0O&amp;quot; - Portrait / *27,&amp;quot;&amp;amp;l1O&amp;quot; - Landscape&lt;br /&gt;
*27,&amp;quot;&amp;amp;l3E&amp;quot; - Top Margin is 3 lines&lt;br /&gt;
*27,&amp;quot;&amp;amp;a5L&amp;quot; - Left Margin is 5 columns&lt;br /&gt;
*27,&amp;quot;&amp;amp;k2G&amp;quot; - Line endings are LF. Default Line endings are CRLF (unless overridden in printer settings).&lt;br /&gt;
*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; - Primary &#039;(s&#039; font is fixed pitch, 12 cpi, upright (not italic), not bold, and is the Courier Font (#4099).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 12 CPI 6 LPI ====&lt;br /&gt;
This is THE MOST COMMON subtype to use. Most reports in VISTA print on this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 56&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====  Landscape Letter 14 CPI 6 LPI ====&lt;br /&gt;
This is the second most common subtype. Any menu option that says it needs 132 characters will need to use this subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132          RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 45&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p14h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 17 CPI 7 LPI (MARs and BCMA Med Log) ====&lt;br /&gt;
This is the (theoretically) third most commonly used subtype. It&#039;s only used for specific reports. It&#039;s also known as a condensed print subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128           RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;(s0p17h9v0s0b4099T&amp;quot;,*27,&lt;br /&gt;
&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Landscape Letter 22 CPI 12 LPI ====&lt;br /&gt;
This is the subtype that will take the most amount of text; it&#039;s ideal to print a lot of data from Fileman, for example. It&#039;s also known as the condensed landscape print subtype. It&#039;s not commonly used except by Fileman power users.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228         RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p22h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot;               W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Legal 12 CPI 6 LPI ====&lt;br /&gt;
This is not commonly used; I just created this because I thought it may it come in useful for some users.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
NAME: P-HP-LGL-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 74&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Greensheet ====&lt;br /&gt;
If you don&#039;t know what a green sheet is, then skip this. It&#039;s here for those who want it. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-GREENSHEET      RIGHT MARGIN: 100&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l0O&amp;quot;,*27,&amp;quot;&amp;amp;l4H&amp;quot;,*27,&amp;quot;&amp;amp;l1E&amp;quot;,*27,&amp;quot;(s0p&amp;quot;&lt;br /&gt;
_$S($G(PSDCPI)=10:&amp;quot;10h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10H&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12H&amp;quot;&lt;br /&gt;
  DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
  DEFAULT LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l8C&amp;quot;&lt;br /&gt;
  X LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l12C&amp;quot;&lt;br /&gt;
  BAR CODE OFF: &amp;quot;*&amp;quot;_$C(27)_&amp;quot;&amp;amp;l0O&amp;quot;_$C(27)_&amp;quot;(8U&amp;quot;_$C(27)_&amp;quot;(s0p&amp;quot;_$S($G(PSDCPI)=10:&amp;quot;1&lt;br /&gt;
0h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot;&lt;br /&gt;
  BAR CODE ON: $S($D(PSDX2):$C(27)_&amp;quot;*p&amp;quot;_(PSDX2-1*300+200)_&amp;quot;y*p&amp;quot;_(PSDX1-1*810+38)&lt;br /&gt;
_&amp;quot;X&amp;quot;,1:&amp;quot;&amp;quot;)_$C(27)_&amp;quot;(0Y&amp;quot;_$C(27)_&amp;quot;(s0p8.1h12v0s0b0T*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Outpatient Label Printer ====&lt;br /&gt;
This one is a bit specialized. This is normally set-up by running routines (in this sequence) ^PSOLLU2, ^PSOLLU3, ^PSOLLU4. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HPLJ4SI-P12                     SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 57                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;&lt;br /&gt;
 W $C(27),&amp;quot;&amp;amp;k2G&amp;quot; S $X=0                 DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: ACI&lt;br /&gt;
  FULL NAME: ADDRESS CHANGE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F12&amp;quot;,PSOX=1210,PSOY=700,PSOFY=1270&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: ALI&lt;br /&gt;
  FULL NAME: ALLERGY SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=1350,PSOYI=50,PSOYM=2700&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: AWI&lt;br /&gt;
  FULL NAME: ALLERGY WARNING INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: BLB&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BODY INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSODX=275,PSOY=140,PSOYI=40,PSOYM=379,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: BLBC&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(s1p10.4v4,12b4,12s24670T&amp;quot;,$C(27),&amp;quot;&amp;amp;a90P&amp;quot;,$C(27),&amp;quot;*p36&lt;br /&gt;
50x1000Y&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: BLF&lt;br /&gt;
  FULL NAME: BOTTLE LABEL FOOTER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSODY=460,PSOX=0,PSOCX=280,PSOQY=550,PSOTY=600,PSOFONT=&amp;quot;F10&amp;quot;,P&lt;br /&gt;
SOQFONT=&amp;quot;F8&amp;quot;,PSODFONT=&amp;quot;F9&amp;quot;,PSOTFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 7                               CTRL CODE ABBREVIATION: BLH&lt;br /&gt;
  FULL NAME: BOTTLE LABEL HEADER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=100,PSOY=50,PSOYI=30,PSOFONT=&amp;quot;F9&amp;quot;&lt;br /&gt;
NUMBER: 8                               CTRL CODE ABBREVIATION: CDII&lt;br /&gt;
  FULL NAME: CRITICAL DRUG INTERACTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 9                               CTRL CODE ABBREVIATION: CNI&lt;br /&gt;
  FULL NAME: COPAY NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOX=1210,PSOYM=3950,PSOFONT=&amp;quot;F10&amp;quot;,PSOYI=50&lt;br /&gt;
NUMBER: 10                              CTRL CODE ABBREVIATION: EBLBC&lt;br /&gt;
  FULL NAME: END OF BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;,$C(27),&amp;quot;&amp;amp;a0P&amp;quot;,!&lt;br /&gt;
NUMBER: 11                              CTRL CODE ABBREVIATION: EBT&lt;br /&gt;
  FULL NAME: END OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(8U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;,!&lt;br /&gt;
NUMBER: 12                              CTRL CODE ABBREVIATION: F10&lt;br /&gt;
  FULL NAME: TEN POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 13                              CTRL CODE ABBREVIATION: F10B&lt;br /&gt;
  FULL NAME: TEN POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 14                              CTRL CODE ABBREVIATION: F12&lt;br /&gt;
  FULL NAME: TWELVE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 15                              CTRL CODE ABBREVIATION: F12B&lt;br /&gt;
  FULL NAME: 12 POINT FONT BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 16                              CTRL CODE ABBREVIATION: F6&lt;br /&gt;
  FULL NAME: SIX POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 17                              CTRL CODE ABBREVIATION: F6B&lt;br /&gt;
  FULL NAME: SIX POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 18                              CTRL CODE ABBREVIATION: F8&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 19                              CTRL CODE ABBREVIATION: F8B&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 20                              CTRL CODE ABBREVIATION: F9&lt;br /&gt;
  FULL NAME: NINE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 21                              CTRL CODE ABBREVIATION: F9B&lt;br /&gt;
  FULL NAME: NINE POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 22                              CTRL CODE ABBREVIATION: FDU&lt;br /&gt;
  FULL NAME: FONT DISABLE UNDERLINE     CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d@&amp;quot;&lt;br /&gt;
NUMBER: 23                              CTRL CODE ABBREVIATION: FWU&lt;br /&gt;
  FULL NAME: FONT WITH UNDERLINE        CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d0D&amp;quot;&lt;br /&gt;
NUMBER: 24                              CTRL CODE ABBREVIATION: LL&lt;br /&gt;
  FULL NAME: LASER LABEL                CONTROL CODE: Q&lt;br /&gt;
NUMBER: 25                              CTRL CODE ABBREVIATION: LLI&lt;br /&gt;
  FULL NAME: LASER LABEL INIT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;&amp;amp;r1F&amp;quot;,$C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;u300D&amp;quot;,$C(27),&lt;br /&gt;
&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0E&amp;quot;,!&lt;br /&gt;
NUMBER: 26                              CTRL CODE ABBREVIATION: MLI&lt;br /&gt;
  FULL NAME: MAILING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=175,PSOYI=50&lt;br /&gt;
NUMBER: 27                              CTRL CODE ABBREVIATION: NR&lt;br /&gt;
  FULL NAME: NORMAL ROTATION            CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a0P&amp;quot;&lt;br /&gt;
NUMBER: 28                              CTRL CODE ABBREVIATION: PFDI&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=690,PSOYI=40,PSOYM=969&lt;br /&gt;
NUMBER: 29                              CTRL CODE ABBREVIATION: PFDQ&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT QUANTITY&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOCX=200,PSOY=970,PSOYI=50,PSOQFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 30                              CTRL CODE ABBREVIATION: PFDT&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT TRAILER&lt;br /&gt;
  CONTROL CODE: S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=50,PSOTFONT=&amp;quot;F9&lt;br /&gt;
&amp;quot;,PSOBY=1280&lt;br /&gt;
NUMBER: 31                              CTRL CODE ABBREVIATION: PFDW&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT WARNING&lt;br /&gt;
  CONTROL CODE: S PSOY=1258,PSOX=660,PSOYI=30,PSOFONT=&amp;quot;F8&amp;quot;,PSOYM=1329&lt;br /&gt;
NUMBER: 32                              CTRL CODE ABBREVIATION: PFI&lt;br /&gt;
  FULL NAME: PATIENT FILL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=710,PSOYI=45,PSOHFONT=&amp;quot;F12&amp;quot;,PSOBY&lt;br /&gt;
I=100&lt;br /&gt;
NUMBER: 33                              CTRL CODE ABBREVIATION: PII&lt;br /&gt;
  FULL NAME: PATIENT INSTRUCTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1210,PSOY=760,PSOFONT=&amp;quot;F12&amp;quot;&lt;br /&gt;
NUMBER: 34                              CTRL CODE ABBREVIATION: PMII&lt;br /&gt;
  FULL NAME: PMI SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;,PSOYM=3899&lt;br /&gt;
NUMBER: 35                              CTRL CODE ABBREVIATION: RMI&lt;br /&gt;
  FULL NAME: RETURN MAIL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=35,PSORYI=40,PSOHYI&lt;br /&gt;
=40,PSOTFONT=&amp;quot;F8&amp;quot;,PSOTY=550&lt;br /&gt;
NUMBER: 36                              CTRL CODE ABBREVIATION: RNI&lt;br /&gt;
  FULL NAME: REFILL NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOYI=50,PSOYM=3950&lt;br /&gt;
NUMBER: 37                              CTRL CODE ABBREVIATION: RPI&lt;br /&gt;
  FULL NAME: REFILL PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=65,PSOTYI=50,PSOLX=0,PSORX=1210,PSOY=1350&lt;br /&gt;
,PSOYM=3650,PSOXI=90,PSOSYI=135&lt;br /&gt;
NUMBER: 38                              CTRL CODE ABBREVIATION: RT&lt;br /&gt;
  FULL NAME: ROTATE TEXT                CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a90P&amp;quot;&lt;br /&gt;
NUMBER: 39                              CTRL CODE ABBREVIATION: SBT&lt;br /&gt;
  FULL NAME: START OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;,$C(27),&amp;quot;(s1p14&lt;br /&gt;
.4v6,18b6,18s24670T&amp;quot;&lt;br /&gt;
NUMBER: 40                              CTRL CODE ABBREVIATION: SPI&lt;br /&gt;
  FULL NAME: SUSPENSE PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=1350,PSOYI=50,PSOCX=1775,PSOYM=27&lt;br /&gt;
00&lt;br /&gt;
NUMBER: 41                              CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: START OF TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;&lt;br /&gt;
NUMBER: 42                              CTRL CODE ABBREVIATION: WLI&lt;br /&gt;
  FULL NAME: WARNING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1050,PSOY=55&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Zebra Subtypes ===&lt;br /&gt;
For whatever reason, all commercial implementations I have worked on used Zebra printers for labels. One IMPORTANT aspect to note is that the existing subtypes in VISTA are written for 203 dpi Zebra printers. If you print them on 300 dpi Zebra printers, they will look shrunk. In the subtypes below, Right Margin, Page Length, and Back Space have to be filled out because they are required fields, but the software doesn&#039;t use them.&lt;br /&gt;
&lt;br /&gt;
==== ZPL II Commands ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lab Label ====&lt;br /&gt;
This is 1&amp;quot; x 2&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-LAB&lt;br /&gt;
  RIGHT MARGIN: 132                     FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 64                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW406.4^CFD,18,10^LH25,10&amp;quot;&lt;br /&gt;
  CLOSE EXECUTE: W &amp;quot;^XZ&amp;quot;                DESCRIPTION: Zebra Lab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy BCMA Label ====&lt;br /&gt;
This is 1&amp;quot; x 3.5&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-PHARM-BCMA                &lt;br /&gt;
  RIGHT MARGIN: 80                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 10                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW711.2^CFD,18,10^LH15,25^XZ&amp;quot;&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: SL&lt;br /&gt;
  FULL NAME: Start Label                CONTROL CODE: W !,&amp;quot;^XA&amp;quot;,!,&amp;quot;^LH0,0^FS&amp;quot;&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: EL&lt;br /&gt;
  FULL NAME: End Label                  CONTROL CODE: W !,&amp;quot;^XZ&amp;quot;&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: EB&lt;br /&gt;
  FULL NAME: End Barcode&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^FO20,150^A0N,30,20^CI13^FR^FD&amp;quot;_TEXT_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: SB&lt;br /&gt;
  FULL NAME: Start Barcode&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^BY1,2.0^FO650,25^BXN,3,200^FD&amp;quot;_PSBBAR_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: Start Text&lt;br /&gt;
  CONTROL CODE: W !,&amp;quot;^FO&amp;quot;_PSBTYPE_&amp;quot;^A0N,30,20^CI13^FR^FD&amp;quot;_TEXT_&amp;quot;^FS&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: STF&lt;br /&gt;
  FULL NAME: Start Text Field&lt;br /&gt;
  CONTROL CODE: S PSBTYPE=$S(PSBTLE=&amp;quot;PSBDRUG&amp;quot;:&amp;quot;20,25&amp;quot;,PSBTLE=&amp;quot;PSBDOSE&amp;quot;:&amp;quot;20,60^FB&lt;br /&gt;
320,5&amp;quot;,PSBTLE=&amp;quot;PSBNAME&amp;quot;:&amp;quot;350,60&amp;quot;,PSBTLE=&amp;quot;PSBWARD&amp;quot;:&amp;quot;350,90&amp;quot;,PSBTLE=&amp;quot;PSBLOT&amp;quot;:&amp;quot;350,&lt;br /&gt;
120&amp;quot;,PSBTLE=&amp;quot;PSBEXP&amp;quot;:&amp;quot;350,150&amp;quot;,PSBTLE=&amp;quot;PSBMFG&amp;quot;:&amp;quot;500,150&amp;quot;,PSBTLE=&amp;quot;PSBFCB&amp;quot;:&amp;quot;350,18&lt;br /&gt;
0&amp;quot;,1:&amp;quot;0,0&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Unit Dose Label (vxVistA only) ====&lt;br /&gt;
VA VistA uses a dot matrix printer printing on a sheet of 1&amp;quot; x 3.5&amp;quot; x 2 columns.&lt;br /&gt;
vxVistA was written to use Unit Dose labels. This is 1&amp;quot; x 3.5&amp;quot; single column.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-ZEBRA-PHARM-UD&lt;br /&gt;
  RIGHT MARGIN: 132                     FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 64                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W &amp;quot;^XA^LL203.2^PW711.2^CFD,18,10^LH15,25^XZ&amp;quot;&lt;br /&gt;
  DESCRIPTION: ZEBRA BARCODE LABEL PRINTER&lt;br /&gt;
  SYNONYM: ZEBRA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Support for Advanced Subtype Specifiers ==&lt;br /&gt;
If you look at [http://www.va.gov/vdl/documents/Infrastructure/Kernel/krn8_0sm.pdf|the kernel system management guide], you will notice that you can use a rather obtuse syntax to customize your output on a print by print basis. E.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LASER;P-LASER-LANDSCAPE;/M132L100P16BQ2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
M stands for right margin, here set to 132; L stands for page length, here 100; P stands for pitch, here 16, can only be 10, 12 or 16; B stands for Bold; and Q stands for Quality, taking in 0, 1 or 2, here set to 2.&lt;br /&gt;
&lt;br /&gt;
How to set up a device to support this isn&#039;t documented anywhere in the Kernel Manuals; I figured it out eventually by reading the %ZIS source code. You need to set up these fields as follows for each subtype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10h&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
  HIGH INTENSITY (BOLD): $C(27)_&amp;quot;(s3b&amp;quot;  LOW INTENSITY (UNBOLD): $C(27)_&amp;quot;(s-3b&amp;quot;&lt;br /&gt;
  NORMAL INTENSITY (RESET): $C(27)_&amp;quot;(s0b&amp;quot;&lt;br /&gt;
  16 PITCH: $C(27)_&amp;quot;(s16h&amp;quot;              DEFAULT PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only thing you may have to vary between different subtypes is what is considered a default pitch. Here it is 12, but it can be different. Reading the code, I don&#039;t believe that setting the default pitch matters since the printer gets reset every single time a job is sent, discarding the last pitch sent. I don&#039;t support &#039;Q&#039; in the configuration above, so it has no effect; that&#039;s because &#039;Q&#039; is nonsensical when using laser printers. It had a use back in the dot-matrix days.&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17172</id>
		<title>VISTA Printing Printer Subtypes</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17172"/>
		<updated>2016-10-03T21:00:56Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* Common Subtypes in VISTA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= VISTA Subtypes =&lt;br /&gt;
&#039;&#039;Written by Sam Habiel&#039;&#039;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is a Subtype ==&lt;br /&gt;
A subtype (stored in file #3.2 TERMINAL TYPE) is an entry associated with each device that tells the device how to handle special non-standard situations; plus some base characteristics. With printers, typically a subtype has two fields populated: Open Execute and Close Execute, in addition to Right Margin, Form Feed, Page Length, and Back Space. The Open Execute resets the printer, sets the page orientation, sets the top and left margins, and sets the font size. The close execute sets the variable IONOFF to an empty string (effectively defining it in the symbol table), and sends a reset to the printer. Right Margin and Back Space aren&#039;t used with printers; Form Feed goes into the M variable IOF, Page Length goes into the M variable IOSL (&amp;quot;IO Screen Length&amp;quot;) determines how many lines are to be printed on each page before VISTA sends an IOF to go to the next page. That&#039;s important to keep in mind since the number of lines that VISTA prints needs to match how many lines are available on the page, otherwise the printer will either spit an extra page containing the extra lines or it will clip the output, depending on whether you specified how many lines are to be printed in PCL. The subtypes below don&#039;t specify how many lines to print, so the former behavior will happen with them. The solution is to decrease page length.&lt;br /&gt;
&lt;br /&gt;
The reason IONOFF is needed is that by default VISTA will send an extra page following each print out; because it was developed in the days of dot-matrix printers, where the extra page separated jobs. The days of dot-matrix printing are practically over; most printers used today are inkjet or laser. Typically we don&#039;t want an extra page at the end. You may be lead to believe that IONOFF is enough; however, most reports in VISTA have hardcoded extra pages at the beginning or end. I was told there was going to be a project in the late 90&#039;s to make sure all reports relied on the device handler for printing separator pages, but that never happened.&lt;br /&gt;
&lt;br /&gt;
There is a field in the device file called &amp;quot;SUPPRESS FORM FEED AT CLOSE&amp;quot;. This field does the exact same thing as setting IONOFF in the Close Execute in the terminal type. In general, I recommend setting IONOFF in the terminal type rather than filling SUPPRESS FORM FEED AT CLOSE for every single printer you configure.&lt;br /&gt;
&lt;br /&gt;
The same extra page issues apply to Zebra printers as well, except over there they may manifest as extra labels if IOF is configured to send a label feed command (^PH or ~PH). If IOF is configured to be a &#039;#&#039;, it will have no effect on the Zebra printer.&lt;br /&gt;
&lt;br /&gt;
== How to specify a Subtype? ==&lt;br /&gt;
Normally, subtypes are configured once per device. When you set up a printer in the DEVICE file, you populate the subtype in the subtype field.&lt;br /&gt;
&lt;br /&gt;
However, you can override subtype selection on a job basis, by using this syntax on the Device prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICE: printer_name;subtype&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you type partial matches, the device driver (^%ZIS) is going to list for you all partial matches for you to choose form. That&#039;s pretty nice since I never remember what subtypes I have beyond them having P-HP at the beginning.&lt;br /&gt;
&lt;br /&gt;
There are variations on this syntax, by the way, that don&#039;t have to do with subtypes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. DEVICE: printer_name;right margin;page length&lt;br /&gt;
2. DEVICE: printer_name;subtype;right margin; page length&lt;br /&gt;
2. DEVICE: ;right margin;page length&lt;br /&gt;
3. DEVICE: ;;page length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can specify custom margins and page lengths. You need to remember that aside from terminal emulators, margins have no effect, as VISTA does not test for them when printing. It does really care about the page length though (see discussion about IOSL above). If a printer name isn&#039;t specified, the home device is assumed.&lt;br /&gt;
&lt;br /&gt;
Novice power users type &#039;;;99999&#039; to print a report without page breaks on the terminal emulator, without understanding what it means. The variations above should tell you: print to the home device to an infinite length. Of note, $Y on Cache wraps at the unsigned int16 limit (32767); therefore, testing if $Y is greater than IOSL when IOSL is greater than 32767 (in my last example, it&#039;s 99999) will always return false, causing page breaks to never be issued. As far as I know, GT.M does not wrap $Y, so you may have to give it gigantic page lengths; although, in practice, I don&#039;t remember having encountered that problem. It&#039;s possible there is something in ^%ZIS4 that I missed regarding that.&lt;br /&gt;
&lt;br /&gt;
== Common Subtypes in VISTA ==&lt;br /&gt;
Here are the most common subtypes in VISTA (standardized for Unices; you will need to remove $C(27),&amp;quot;&amp;amp;k2G&amp;quot; on Windows Servers):&lt;br /&gt;
&lt;br /&gt;
NB: CPI = Characters Per Inch; LPI = Lines Per Inch&lt;br /&gt;
=== PCL Subtypes ===&lt;br /&gt;
==== PCL5 Quick Reference ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*27,&amp;quot;E&amp;quot;/$C(27,69) - Reset&lt;br /&gt;
*27,&amp;quot;&amp;amp;l0O&amp;quot; - Portrait / *27,&amp;quot;&amp;amp;l1O&amp;quot; - Landscape&lt;br /&gt;
*27,&amp;quot;&amp;amp;l3E&amp;quot; - Top Margin is 3 lines&lt;br /&gt;
*27,&amp;quot;&amp;amp;a5L&amp;quot; - Left Margin is 5 columns&lt;br /&gt;
*27,&amp;quot;&amp;amp;k2G&amp;quot; - Line endings are LF. Default Line endings are CRLF (unless overridden in printer settings).&lt;br /&gt;
*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; - Primary &#039;(s&#039; font is fixed pitch, 12 cpi, upright (not italic), not bold, and is the Courier Font (#4099).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 12 CPI 6 LPI ====&lt;br /&gt;
This is THE MOST COMMON subtype to use. Most reports in VISTA print on this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 56&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====  Landscape Letter 14 CPI 6 LPI ====&lt;br /&gt;
This is the second most common subtype. Any menu option that says it needs 132 characters will need to use this subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132          RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 45&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p14h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 17 CPI 7 LPI (MARs and BCMA Med Log) ====&lt;br /&gt;
This is the (theoretically) third most commonly used subtype. It&#039;s only used for specific reports. It&#039;s also known as a condensed print subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128           RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;(s0p17h9v0s0b4099T&amp;quot;,*27,&lt;br /&gt;
&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Landscape Letter 22 CPI 12 LPI ====&lt;br /&gt;
This is the subtype that will take the most amount of text; it&#039;s ideal to print a lot of data from Fileman, for example. It&#039;s also known as the condensed landscape print subtype. It&#039;s not commonly used except by Fileman power users.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228         RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p22h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot;               W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Legal 12 CPI 6 LPI ====&lt;br /&gt;
This is not commonly used; I just created this because I thought it may it come in useful for some users.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
NAME: P-HP-LGL-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 74&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Greensheet ====&lt;br /&gt;
If you don&#039;t know what a green sheet is, then skip this. It&#039;s here for those who want it. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-GREENSHEET      RIGHT MARGIN: 100&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l0O&amp;quot;,*27,&amp;quot;&amp;amp;l4H&amp;quot;,*27,&amp;quot;&amp;amp;l1E&amp;quot;,*27,&amp;quot;(s0p&amp;quot;&lt;br /&gt;
_$S($G(PSDCPI)=10:&amp;quot;10h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10H&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12H&amp;quot;&lt;br /&gt;
  DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
  DEFAULT LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l8C&amp;quot;&lt;br /&gt;
  X LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l12C&amp;quot;&lt;br /&gt;
  BAR CODE OFF: &amp;quot;*&amp;quot;_$C(27)_&amp;quot;&amp;amp;l0O&amp;quot;_$C(27)_&amp;quot;(8U&amp;quot;_$C(27)_&amp;quot;(s0p&amp;quot;_$S($G(PSDCPI)=10:&amp;quot;1&lt;br /&gt;
0h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot;&lt;br /&gt;
  BAR CODE ON: $S($D(PSDX2):$C(27)_&amp;quot;*p&amp;quot;_(PSDX2-1*300+200)_&amp;quot;y*p&amp;quot;_(PSDX1-1*810+38)&lt;br /&gt;
_&amp;quot;X&amp;quot;,1:&amp;quot;&amp;quot;)_$C(27)_&amp;quot;(0Y&amp;quot;_$C(27)_&amp;quot;(s0p8.1h12v0s0b0T*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pharmacy Outpatient Label Printer ====&lt;br /&gt;
This one is a bit specialized. This is normally set-up by running routines (in this sequence) ^PSOLLU2, ^PSOLLU3, ^PSOLLU4. You need to buy a barcode chip in order for the barcodes to print.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HPLJ4SI-P12                     SELECTABLE AT SIGN-ON: NO&lt;br /&gt;
  RIGHT MARGIN: 96                      FORM FEED: #&lt;br /&gt;
  PAGE LENGTH: 57                       BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;(0N&amp;quot;,$C(27),&amp;quot;(s0p12h0s0b4099T&amp;quot;&lt;br /&gt;
 W $C(27),&amp;quot;&amp;amp;k2G&amp;quot; S $X=0                 DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
NUMBER: 1                               CTRL CODE ABBREVIATION: ACI&lt;br /&gt;
  FULL NAME: ADDRESS CHANGE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F12&amp;quot;,PSOX=1210,PSOY=700,PSOFY=1270&lt;br /&gt;
NUMBER: 2                               CTRL CODE ABBREVIATION: ALI&lt;br /&gt;
  FULL NAME: ALLERGY SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=1350,PSOYI=50,PSOYM=2700&lt;br /&gt;
NUMBER: 3                               CTRL CODE ABBREVIATION: AWI&lt;br /&gt;
  FULL NAME: ALLERGY WARNING INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 4                               CTRL CODE ABBREVIATION: BLB&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BODY INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSODX=275,PSOY=140,PSOYI=40,PSOYM=379,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 5                               CTRL CODE ABBREVIATION: BLBC&lt;br /&gt;
  FULL NAME: BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(s1p10.4v4,12b4,12s24670T&amp;quot;,$C(27),&amp;quot;&amp;amp;a90P&amp;quot;,$C(27),&amp;quot;*p36&lt;br /&gt;
50x1000Y&amp;quot;&lt;br /&gt;
NUMBER: 6                               CTRL CODE ABBREVIATION: BLF&lt;br /&gt;
  FULL NAME: BOTTLE LABEL FOOTER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSODY=460,PSOX=0,PSOCX=280,PSOQY=550,PSOTY=600,PSOFONT=&amp;quot;F10&amp;quot;,P&lt;br /&gt;
SOQFONT=&amp;quot;F8&amp;quot;,PSODFONT=&amp;quot;F9&amp;quot;,PSOTFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 7                               CTRL CODE ABBREVIATION: BLH&lt;br /&gt;
  FULL NAME: BOTTLE LABEL HEADER INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=100,PSOY=50,PSOYI=30,PSOFONT=&amp;quot;F9&amp;quot;&lt;br /&gt;
NUMBER: 8                               CTRL CODE ABBREVIATION: CDII&lt;br /&gt;
  FULL NAME: CRITICAL DRUG INTERACTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 9                               CTRL CODE ABBREVIATION: CNI&lt;br /&gt;
  FULL NAME: COPAY NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOX=1210,PSOYM=3950,PSOFONT=&amp;quot;F10&amp;quot;,PSOYI=50&lt;br /&gt;
NUMBER: 10                              CTRL CODE ABBREVIATION: EBLBC&lt;br /&gt;
  FULL NAME: END OF BOTTLE LABEL BARCODE&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;,$C(27),&amp;quot;&amp;amp;a0P&amp;quot;,!&lt;br /&gt;
NUMBER: 11                              CTRL CODE ABBREVIATION: EBT&lt;br /&gt;
  FULL NAME: END OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(8U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;,!&lt;br /&gt;
NUMBER: 12                              CTRL CODE ABBREVIATION: F10&lt;br /&gt;
  FULL NAME: TEN POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 13                              CTRL CODE ABBREVIATION: F10B&lt;br /&gt;
  FULL NAME: TEN POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p10v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 14                              CTRL CODE ABBREVIATION: F12&lt;br /&gt;
  FULL NAME: TWELVE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 15                              CTRL CODE ABBREVIATION: F12B&lt;br /&gt;
  FULL NAME: 12 POINT FONT BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p12v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 16                              CTRL CODE ABBREVIATION: F6&lt;br /&gt;
  FULL NAME: SIX POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 17                              CTRL CODE ABBREVIATION: F6B&lt;br /&gt;
  FULL NAME: SIX POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p6v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 18                              CTRL CODE ABBREVIATION: F8&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 19                              CTRL CODE ABBREVIATION: F8B&lt;br /&gt;
  FULL NAME: EIGHT POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p8v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 20                              CTRL CODE ABBREVIATION: F9&lt;br /&gt;
  FULL NAME: NINE POINT FONT - NO BOLD&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s0b16602T&amp;quot;&lt;br /&gt;
NUMBER: 21                              CTRL CODE ABBREVIATION: F9B&lt;br /&gt;
  FULL NAME: NINE POINT FONT, BOLDED&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;(10U&amp;quot;,$C(27),&amp;quot;(s1p9v0s3b16602T&amp;quot;&lt;br /&gt;
NUMBER: 22                              CTRL CODE ABBREVIATION: FDU&lt;br /&gt;
  FULL NAME: FONT DISABLE UNDERLINE     CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d@&amp;quot;&lt;br /&gt;
NUMBER: 23                              CTRL CODE ABBREVIATION: FWU&lt;br /&gt;
  FULL NAME: FONT WITH UNDERLINE        CONTROL CODE: W $C(27),&amp;quot;&amp;amp;d0D&amp;quot;&lt;br /&gt;
NUMBER: 24                              CTRL CODE ABBREVIATION: LL&lt;br /&gt;
  FULL NAME: LASER LABEL                CONTROL CODE: Q&lt;br /&gt;
NUMBER: 25                              CTRL CODE ABBREVIATION: LLI&lt;br /&gt;
  FULL NAME: LASER LABEL INIT&lt;br /&gt;
  CONTROL CODE: W $C(27),&amp;quot;&amp;amp;r1F&amp;quot;,$C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;u300D&amp;quot;,$C(27),&lt;br /&gt;
&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0E&amp;quot;,!&lt;br /&gt;
NUMBER: 26                              CTRL CODE ABBREVIATION: MLI&lt;br /&gt;
  FULL NAME: MAILING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=175,PSOYI=50&lt;br /&gt;
NUMBER: 27                              CTRL CODE ABBREVIATION: NR&lt;br /&gt;
  FULL NAME: NORMAL ROTATION            CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a0P&amp;quot;&lt;br /&gt;
NUMBER: 28                              CTRL CODE ABBREVIATION: PFDI&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOY=690,PSOYI=40,PSOYM=969&lt;br /&gt;
NUMBER: 29                              CTRL CODE ABBREVIATION: PFDQ&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT QUANTITY&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOCX=200,PSOY=970,PSOYI=50,PSOQFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;&lt;br /&gt;
NUMBER: 30                              CTRL CODE ABBREVIATION: PFDT&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT TRAILER&lt;br /&gt;
  CONTROL CODE: S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=50,PSOTFONT=&amp;quot;F9&lt;br /&gt;
&amp;quot;,PSOBY=1280&lt;br /&gt;
NUMBER: 31                              CTRL CODE ABBREVIATION: PFDW&lt;br /&gt;
  FULL NAME: PHARMACY FILL DOCUMENT WARNING&lt;br /&gt;
  CONTROL CODE: S PSOY=1258,PSOX=660,PSOYI=30,PSOFONT=&amp;quot;F8&amp;quot;,PSOYM=1329&lt;br /&gt;
NUMBER: 32                              CTRL CODE ABBREVIATION: PFI&lt;br /&gt;
  FULL NAME: PATIENT FILL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=710,PSOYI=45,PSOHFONT=&amp;quot;F12&amp;quot;,PSOBY&lt;br /&gt;
I=100&lt;br /&gt;
NUMBER: 33                              CTRL CODE ABBREVIATION: PII&lt;br /&gt;
  FULL NAME: PATIENT INSTRUCTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1210,PSOY=760,PSOFONT=&amp;quot;F12&amp;quot;&lt;br /&gt;
NUMBER: 34                              CTRL CODE ABBREVIATION: PMII&lt;br /&gt;
  FULL NAME: PMI SECTION INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=&amp;quot;F10&amp;quot;,PSOYM=3899&lt;br /&gt;
NUMBER: 35                              CTRL CODE ABBREVIATION: RMI&lt;br /&gt;
  FULL NAME: RETURN MAIL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOHFONT=&amp;quot;F8&amp;quot;,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1680,PSOY=35,PSORYI=40,PSOHYI&lt;br /&gt;
=40,PSOTFONT=&amp;quot;F8&amp;quot;,PSOTY=550&lt;br /&gt;
NUMBER: 36                              CTRL CODE ABBREVIATION: RNI&lt;br /&gt;
  FULL NAME: REFILL NARRATIVE INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOY=2860,PSOFONT=&amp;quot;F10&amp;quot;,PSOX=0,PSOYI=50,PSOYM=3950&lt;br /&gt;
NUMBER: 37                              CTRL CODE ABBREVIATION: RPI&lt;br /&gt;
  FULL NAME: REFILL PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOBYI=65,PSOTYI=50,PSOLX=0,PSORX=1210,PSOY=1350&lt;br /&gt;
,PSOYM=3650,PSOXI=90,PSOSYI=135&lt;br /&gt;
NUMBER: 38                              CTRL CODE ABBREVIATION: RT&lt;br /&gt;
  FULL NAME: ROTATE TEXT                CONTROL CODE: W $C(27),&amp;quot;&amp;amp;a90P&amp;quot;&lt;br /&gt;
NUMBER: 39                              CTRL CODE ABBREVIATION: SBT&lt;br /&gt;
  FULL NAME: START OF BARCODE TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;,$C(27),&amp;quot;(s1p14&lt;br /&gt;
.4v6,18b6,18s24670T&amp;quot;&lt;br /&gt;
NUMBER: 40                              CTRL CODE ABBREVIATION: SPI&lt;br /&gt;
  FULL NAME: SUSPENSE PRINT INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOFONT=&amp;quot;F10&amp;quot;,PSOX=1210,PSOY=1350,PSOYI=50,PSOCX=1775,PSOYM=27&lt;br /&gt;
00&lt;br /&gt;
NUMBER: 41                              CTRL CODE ABBREVIATION: ST&lt;br /&gt;
  FULL NAME: START OF TEXT&lt;br /&gt;
  CONTROL CODE: S PSOY=PSOY+PSOYI W $C(27),&amp;quot;*p&amp;quot;,PSOX,&amp;quot;x&amp;quot;,PSOY,&amp;quot;Y&amp;quot;&lt;br /&gt;
NUMBER: 42                              CTRL CODE ABBREVIATION: WLI&lt;br /&gt;
  FULL NAME: WARNING LABEL INITIALIZATION&lt;br /&gt;
  CONTROL CODE: S PSOX=1050,PSOY=55&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Support for Advanced Subtype Specifiers ==&lt;br /&gt;
If you look at [http://www.va.gov/vdl/documents/Infrastructure/Kernel/krn8_0sm.pdf|the kernel system management guide], you will notice that you can use a rather obtuse syntax to customize your output on a print by print basis. E.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LASER;P-LASER-LANDSCAPE;/M132L100P16BQ2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
M stands for right margin, here set to 132; L stands for page length, here 100; P stands for pitch, here 16, can only be 10, 12 or 16; B stands for Bold; and Q stands for Quality, taking in 0, 1 or 2, here set to 2.&lt;br /&gt;
&lt;br /&gt;
How to set up a device to support this isn&#039;t documented anywhere in the Kernel Manuals; I figured it out eventually by reading the %ZIS source code. You need to set up these fields as follows for each subtype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10h&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
  HIGH INTENSITY (BOLD): $C(27)_&amp;quot;(s3b&amp;quot;  LOW INTENSITY (UNBOLD): $C(27)_&amp;quot;(s-3b&amp;quot;&lt;br /&gt;
  NORMAL INTENSITY (RESET): $C(27)_&amp;quot;(s0b&amp;quot;&lt;br /&gt;
  16 PITCH: $C(27)_&amp;quot;(s16h&amp;quot;              DEFAULT PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only thing you may have to vary between different subtypes is what is considered a default pitch. Here it is 12, but it can be different. Reading the code, I don&#039;t believe that setting the default pitch matters since the printer gets reset every single time a job is sent, discarding the last pitch sent. I don&#039;t support &#039;Q&#039; in the configuration above, so it has no effect; that&#039;s because &#039;Q&#039; is nonsensical when using laser printers. It had a use back in the dot-matrix days.&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17171</id>
		<title>VISTA Printing Printer Subtypes</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=VISTA_Printing_Printer_Subtypes&amp;diff=17171"/>
		<updated>2016-10-03T20:48:11Z</updated>

		<summary type="html">&lt;p&gt;Shabiel: /* VISTA Subtypes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= VISTA Subtypes =&lt;br /&gt;
&#039;&#039;Written by Sam Habiel&#039;&#039;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is a Subtype ==&lt;br /&gt;
A subtype (stored in file #3.2 TERMINAL TYPE) is an entry associated with each device that tells the device how to handle special non-standard situations; plus some base characteristics. With printers, typically a subtype has two fields populated: Open Execute and Close Execute, in addition to Right Margin, Form Feed, Page Length, and Back Space. The Open Execute resets the printer, sets the page orientation, sets the top and left margins, and sets the font size. The close execute sets the variable IONOFF to an empty string (effectively defining it in the symbol table), and sends a reset to the printer. Right Margin and Back Space aren&#039;t used with printers; Form Feed goes into the M variable IOF, Page Length goes into the M variable IOSL (&amp;quot;IO Screen Length&amp;quot;) determines how many lines are to be printed on each page before VISTA sends an IOF to go to the next page. That&#039;s important to keep in mind since the number of lines that VISTA prints needs to match how many lines are available on the page, otherwise the printer will either spit an extra page containing the extra lines or it will clip the output, depending on whether you specified how many lines are to be printed in PCL. The subtypes below don&#039;t specify how many lines to print, so the former behavior will happen with them. The solution is to decrease page length.&lt;br /&gt;
&lt;br /&gt;
The reason IONOFF is needed is that by default VISTA will send an extra page following each print out; because it was developed in the days of dot-matrix printers, where the extra page separated jobs. The days of dot-matrix printing are practically over; most printers used today are inkjet or laser. Typically we don&#039;t want an extra page at the end. You may be lead to believe that IONOFF is enough; however, most reports in VISTA have hardcoded extra pages at the beginning or end. I was told there was going to be a project in the late 90&#039;s to make sure all reports relied on the device handler for printing separator pages, but that never happened.&lt;br /&gt;
&lt;br /&gt;
There is a field in the device file called &amp;quot;SUPPRESS FORM FEED AT CLOSE&amp;quot;. This field does the exact same thing as setting IONOFF in the Close Execute in the terminal type. In general, I recommend setting IONOFF in the terminal type rather than filling SUPPRESS FORM FEED AT CLOSE for every single printer you configure.&lt;br /&gt;
&lt;br /&gt;
The same extra page issues apply to Zebra printers as well, except over there they may manifest as extra labels if IOF is configured to send a label feed command (^PH or ~PH). If IOF is configured to be a &#039;#&#039;, it will have no effect on the Zebra printer.&lt;br /&gt;
&lt;br /&gt;
== How to specify a Subtype? ==&lt;br /&gt;
Normally, subtypes are configured once per device. When you set up a printer in the DEVICE file, you populate the subtype in the subtype field.&lt;br /&gt;
&lt;br /&gt;
However, you can override subtype selection on a job basis, by using this syntax on the Device prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICE: printer_name;subtype&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you type partial matches, the device driver (^%ZIS) is going to list for you all partial matches for you to choose form. That&#039;s pretty nice since I never remember what subtypes I have beyond them having P-HP at the beginning.&lt;br /&gt;
&lt;br /&gt;
There are variations on this syntax, by the way, that don&#039;t have to do with subtypes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. DEVICE: printer_name;right margin;page length&lt;br /&gt;
2. DEVICE: printer_name;subtype;right margin; page length&lt;br /&gt;
2. DEVICE: ;right margin;page length&lt;br /&gt;
3. DEVICE: ;;page length&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can specify custom margins and page lengths. You need to remember that aside from terminal emulators, margins have no effect, as VISTA does not test for them when printing. It does really care about the page length though (see discussion about IOSL above). If a printer name isn&#039;t specified, the home device is assumed.&lt;br /&gt;
&lt;br /&gt;
Novice power users type &#039;;;99999&#039; to print a report without page breaks on the terminal emulator, without understanding what it means. The variations above should tell you: print to the home device to an infinite length. Of note, $Y on Cache wraps at the unsigned int16 limit (32767); therefore, testing if $Y is greater than IOSL when IOSL is greater than 32767 (in my last example, it&#039;s 99999) will always return false, causing page breaks to never be issued. As far as I know, GT.M does not wrap $Y, so you may have to give it gigantic page lengths; although, in practice, I don&#039;t remember having encountered that problem. It&#039;s possible there is something in ^%ZIS4 that I missed regarding that.&lt;br /&gt;
&lt;br /&gt;
== Common Subtypes in VISTA ==&lt;br /&gt;
Here are the most common subtypes in VISTA (standardized for Unices; you will need to remove $C(27),&amp;quot;&amp;amp;k2G&amp;quot; on Windows Servers):&lt;br /&gt;
&lt;br /&gt;
NB: CPI = Characters Per Inch; LPI = Lines Per Inch&lt;br /&gt;
=== PCL Subtypes ===&lt;br /&gt;
==== PCL5 Quick Reference ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*27,&amp;quot;E&amp;quot;/$C(27,69) - Reset&lt;br /&gt;
*27,&amp;quot;&amp;amp;l0O&amp;quot; - Portrait / *27,&amp;quot;&amp;amp;l1O&amp;quot; - Landscape&lt;br /&gt;
*27,&amp;quot;&amp;amp;l3E&amp;quot; - Top Margin is 3 lines&lt;br /&gt;
*27,&amp;quot;&amp;amp;a5L&amp;quot; - Left Margin is 5 columns&lt;br /&gt;
*27,&amp;quot;&amp;amp;k2G&amp;quot; - Line endings are LF. Default Line endings are CRLF (unless overridden in printer settings).&lt;br /&gt;
*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; - Primary &#039;(s&#039; font is fixed pitch, 12 cpi, upright (not italic), not bold, and is the Courier Font (#4099).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 12 CPI 6 LPI ====&lt;br /&gt;
This is THE MOST COMMON subtype to use. Most reports in VISTA print on this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 56&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====  Landscape Letter 14 CPI 6 LPI ====&lt;br /&gt;
This is the second most common subtype. Any menu option that says it needs 132 characters will need to use this subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C14L6-W132          RIGHT MARGIN: 132&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 45&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p14h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Letter 17 CPI 7 LPI (MARs and BCMA Med Log) ====&lt;br /&gt;
This is the (theoretically) third most commonly used subtype. It&#039;s only used for specific reports. It&#039;s also known as a condensed print subtype.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-C17L7-W128           RIGHT MARGIN: 128&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 64&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;(s0p17h9v0s0b4099T&amp;quot;,*27,&lt;br /&gt;
&amp;quot;&amp;amp;l7C&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 17 cpi 7 lpi width 128 standard letter printer (MAR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Landscape Letter 22 CPI 12 LPI ====&lt;br /&gt;
This is the subtype that will take the most amount of text; it&#039;s ideal to print a lot of data from Fileman, for example. It&#039;s also known as the condensed landscape print subtype. It&#039;s not commonly used except by Fileman power users.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-LAND-C22L12-W228         RIGHT MARGIN: 228&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 88&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27,69),$C(27),&amp;quot;&amp;amp;l1O&amp;quot;,$C(27),&amp;quot;&amp;amp;l4E&amp;quot;,$C(27),&amp;quot;&amp;amp;l0D&amp;quot;,$C(27),&amp;quot;&amp;amp;k&lt;br /&gt;
2G&amp;quot;,*27,&amp;quot;(s0p22h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot;               W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 22 cpi 12 lpi width 228 landscape letter printer (condensed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Portrait Legal 12 CPI 6 LPI ====&lt;br /&gt;
This is not commonly used; I just created this because I thought it may it come in useful for some users.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
NAME: P-HP-LGL-POR-C12L6-W80           RIGHT MARGIN: 80&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 74&lt;br /&gt;
  BACK SPACE: $C(8)&lt;br /&gt;
  OPEN EXECUTE: W $C(27),&amp;quot;E&amp;quot;,$C(27),&amp;quot;&amp;amp;l3A&amp;quot;,$C(27),&amp;quot;&amp;amp;l0O&amp;quot;,$C(27),&amp;quot;&amp;amp;l3E&amp;quot;,$C(27),&amp;quot;&amp;amp;&lt;br /&gt;
a5L&amp;quot;,$C(27),&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;(s0p12h0s0b4099T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W *27,&amp;quot;E&amp;quot;&lt;br /&gt;
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Greensheet ====&lt;br /&gt;
If you don&#039;t know what a green sheet is, then skip this. It&#039;s here for those who want it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME: P-HP-LTR-POR-GREENSHEET      RIGHT MARGIN: 100&lt;br /&gt;
  FORM FEED: #                          PAGE LENGTH: 58&lt;br /&gt;
  BACK SPACE: $C(8)                     *OLD XY CRT: 60&lt;br /&gt;
  OPEN EXECUTE: W *27,&amp;quot;E&amp;quot;,*27,&amp;quot;&amp;amp;k2G&amp;quot;,*27,&amp;quot;&amp;amp;l0O&amp;quot;,*27,&amp;quot;&amp;amp;l4H&amp;quot;,*27,&amp;quot;&amp;amp;l1E&amp;quot;,*27,&amp;quot;(s0p&amp;quot;&lt;br /&gt;
_$S($G(PSDCPI)=10:&amp;quot;10h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot; S ($X,$Y)=0&lt;br /&gt;
  CLOSE EXECUTE: S IONOFF=&amp;quot;&amp;quot; W $C(27)_&amp;quot;E&amp;quot;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10H&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12H&amp;quot;&lt;br /&gt;
  DESCRIPTION: HP JL4Si 12 pitch Courier&lt;br /&gt;
  DEFAULT LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l8C&amp;quot;&lt;br /&gt;
  X LINES PER INCH: $C(27)_&amp;quot;&amp;amp;l12C&amp;quot;&lt;br /&gt;
  BAR CODE OFF: &amp;quot;*&amp;quot;_$C(27)_&amp;quot;&amp;amp;l0O&amp;quot;_$C(27)_&amp;quot;(8U&amp;quot;_$C(27)_&amp;quot;(s0p&amp;quot;_$S($G(PSDCPI)=10:&amp;quot;1&lt;br /&gt;
0h14&amp;quot;,1:&amp;quot;12h12&amp;quot;)_&amp;quot;v0s0b6T&amp;quot;&lt;br /&gt;
  BAR CODE ON: $S($D(PSDX2):$C(27)_&amp;quot;*p&amp;quot;_(PSDX2-1*300+200)_&amp;quot;y*p&amp;quot;_(PSDX1-1*810+38)&lt;br /&gt;
_&amp;quot;X&amp;quot;,1:&amp;quot;&amp;quot;)_$C(27)_&amp;quot;(0Y&amp;quot;_$C(27)_&amp;quot;(s0p8.1h12v0s0b0T*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Support for Advanced Subtype Specifiers ==&lt;br /&gt;
If you look at [http://www.va.gov/vdl/documents/Infrastructure/Kernel/krn8_0sm.pdf|the kernel system management guide], you will notice that you can use a rather obtuse syntax to customize your output on a print by print basis. E.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LASER;P-LASER-LANDSCAPE;/M132L100P16BQ2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
M stands for right margin, here set to 132; L stands for page length, here 100; P stands for pitch, here 16, can only be 10, 12 or 16; B stands for Bold; and Q stands for Quality, taking in 0, 1 or 2, here set to 2.&lt;br /&gt;
&lt;br /&gt;
How to set up a device to support this isn&#039;t documented anywhere in the Kernel Manuals; I figured it out eventually by reading the %ZIS source code. You need to set up these fields as follows for each subtype:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  10 PITCH: $C(27)_&amp;quot;(s10h&amp;quot;              12 PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
  HIGH INTENSITY (BOLD): $C(27)_&amp;quot;(s3b&amp;quot;  LOW INTENSITY (UNBOLD): $C(27)_&amp;quot;(s-3b&amp;quot;&lt;br /&gt;
  NORMAL INTENSITY (RESET): $C(27)_&amp;quot;(s0b&amp;quot;&lt;br /&gt;
  16 PITCH: $C(27)_&amp;quot;(s16h&amp;quot;              DEFAULT PITCH: $C(27)_&amp;quot;(s12h&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only thing you may have to vary between different subtypes is what is considered a default pitch. Here it is 12, but it can be different. Reading the code, I don&#039;t believe that setting the default pitch matters since the printer gets reset every single time a job is sent, discarding the last pitch sent. I don&#039;t support &#039;Q&#039; in the configuration above, so it has no effect; that&#039;s because &#039;Q&#039; is nonsensical when using laser printers. It had a use back in the dot-matrix days.&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
</feed>