HP3000-L Archives

March 2004, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Donahue <[log in to unmask]>
Reply To:
Jim Donahue <[log in to unmask]>
Date:
Tue, 9 Mar 2004 14:59:03 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (139 lines)
The logic sounds good and would probably work. We read ours with a COBOL program to process EDI from the file then write back only the records which need to be printed later.
 
We had to print invoices for two seperate divisions, our method is to read IFILE with QUIZ, link the invoice back to the sales order data to determine which printer to send it to. Then we create a job stream for each division passing the invoice numbers print.  Then we took it a step further and print credit memos seperately from invoices and sort by bill-to so their invoices come out together.
 
If you have a tool like quiz, you should be able to completly automate your process.
 
Jim
 
===============================
Jim Donahue
Hubbell Electrical Products
3940 Dr. Martin Luther King Dr
Saint Louis, MO 63113
314-531-8839x3317 e-fax:810-963-4032
[log in to unmask]
================================

>>> "Johnson, Tracy" <[log in to unmask]> 3/9/04 1:40 >>>
This is a MANMAN specific write-up but there are
extensive MPEX commands used in a job, hence this
is also copied to HP3000-L.  (And some on HP3000-L
may be former MANMAN users.)

Due to the infinite wisdom of our company we have 
a separate division that uses the same database as 
another division, the only difference being the 
Product Line.  So what they did, was add a Sales
Category so they can tell the difference.

When it comes to Invoicing, naturally the two 
divisions want to segregate their Invoices on
separate forms (ha ha.)  They "could" manually
print Invoices for one division, then later 
use the ALL function of printing Invoices to
clear the IFILE.  Then they would have to toss 
out Invoices that were previously printed on 
the other division's form.

Too labor intensive and a waste of paper.

I came up with the following job using MPEX to
read each Invoice number from the IFILE and
compare it to the Sales Category in the database.

If a match occurrs it prints the Invoice using 
MANMAN, then overwrites the IFILE record with 
spaces over the Invoice number.

When done, it goes into an editor, (QUAD) and
deletes all the blank lines created by writing
the spaces from the 2nd record to the last.

Lastly it re-writes record 0 with the Integer
in the proper place so that MANMAN is told
the new number of Invoices to be printed.

The question is, can anyone see a flaw in the 
job?

(It is intended to run at a time when no one
else is accessing IFILE, and OM,UT,909 is 
already a custom version of OM,UT,900.)

IFILE is a 5W file flat FB file.
The application password was x'ed out.

- - - - - - - - - TEAR LINE - - - - - - - - - - -

::SETVAR MPEXTELLBACK "!!HPUSER.!!HPACCOUNT"
!JOB VEUT909,MANAGER.{hpaccount};INPRI=13;OUTCLASS=,1;SPSAVE
!EXCLUDE
!RUN MAIN.PUB.VESOFT;PARM=1
SETVAR J VEFINFO("IFILE.FDATABAS").EOF
SETVAR K !J-1
FCOPY FROM=IFILE/LOCK.FDATABAS;TO=;HEX;CHAR
SETVAR FNUM VEFOPEN("IFILE/LOCK.FDATABAS,OLD;SHR;ACC=INOUT")
SETVAR CONTROL VEFREADDIR(fnum,0)
SETVAR GARBAGE CONTROL[2:8]
SETVAR DBID VEDBOPEN("FINDB.FDATABAS,READ,5")
REPEAT
   SETVAR RECORD VEFREADDIR(fnum,!i)
   SETVAR REFNUM LFT("!RECORD",10)
   IF VEDBFIND(DBID,"ARFIL","REFNUM","!REFNUM")
      SETVAR SONUM VEDBGET(DBID,"ARFIL",5,"SONUM")
      IF VEDBFIND(DBID,"SOEFIL","SONUM","!SONUM")
         SETVAR SALECODE VEDBGET(DBID,"SOEFIL",5,"SOESCT")
         CALC SALECODE
         IF SALECODE = "CONP" THEN
            RUN SYSMAN.PUB.MMV110;INFO="OM";XL="!SYSMANXLPATH,!DISCXLADD";&
            INPUT="xxxxx";INPUT="UT,909";INPUT="Y";INPUT="!REFNUM";INPUT="N";&
            INPUT="2";INPUT="1041";INPUT="3";INPUT="";INPUT="Y";INPUT="N";&
            INPUT="E";INPUT="E";INPUT="E"
            CALC VEFWRITEDIR(fnum,"          ",!i)
         ENDIF
         ECHO !REFNUM !SONUM !SALECODE
      ENDIF
   ENDIF
FORNUM I=1,!K
CALC VEFCLOSE(!fnum)
RUN QUAD.PUB.VESOFT;LIB=P
T IFILE/LOCK.FDATABAS
DEBLANK 2/LAST
KEEP
YES
EXIT
ALTFILE IFILE.FDATABAS;LOCK=LOCK;DELACD;LOCAL
SETVAR J VEFINFO("IFILE.FDATABAS").EOF - 1
SETVAR FNUM VEFOPEN("IFILE/LOCK.FDATABAS,OLD;SHR;ACC=INOUT")
IF J = 1 THEN
   SETVAR NEW_CONTROL STRWRITE(0:'I2') + GARBAGE
   CALC VEFWRITEDIR(fnum,"!REFNUM",1)
ELSE
   SETVAR NEW_CONTROL STRWRITE(J:'I2') + GARBAGE
ENDIF
CALC VEFWRITEDIR(fnum,NEW_CONTROL,0)
CALC VEFCLOSE(!fnum)
FCOPY FROM=IFILE/LOCK.FDATABAS;TO=;HEX;CHAR
EXIT
!EOJ





**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

www.hubbell.com - Hubbell Incorporated
**********************************************************************

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2