× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"are you sure a record was read?"

Yes; as a matter of fact I go through the loop four times.  I added the INZ
keyword as you recommended but I can not see what the problem may be.  This is
the whole program... pretty simple.

FIMHistz5  IF   E           K DISK
DDS_Hist        e ds                  extname(IMHistz5) inz
DLast_Location    s                   like(AJAD0A)

*---------------------------------------------------------------------------------------------


C                   movel(p)  'AA9500D3307' AJAAFZ
C                   movel(p)  '1  '         AJACJS
 *
C                   Exsr      Get_Last_Loc
C                   Seton                                        lr

*---------------------------------------------------------------------------------------------


 * GET_LAST_LOC - Determine the last location ID reported

*---------------------------------------------------------------------------------------------


C     Get_Last_Loc  Begsr
C     IM_Key        Klist
C                   Kfld                    AJAAFZ                         Item
Number
C                   Kfld                    AJACJS
Warehouse
C                   Eval      Last_Location = *blanks
C                   Setoff                                       8081
C     IM_Key        Setll     IMHistz5
C                   Dou       *In80
C     IM_Key        Reade     IMHistz5                               80
C                   If        *In80
C                   Leave
C                   Endif
 *
 *                  Process just receiving transactions (PQ/RP) to stock
C                   If        AJABMO = 'PQ' or AJABMO = 'RP'
<----|
C                   Eval      Last_Location = AJAD0A
|
 *
|
C                   If        Last_Location = *Blanks
<---||
 *                  If the NEW LOCATION field is empty, look for the
||
 *                  most current/previous "TW" transaction.  This will
||
 *                  contain the location where the material was moved to.
||
C                   Dou       *In81 or AJABMO = 'TW'
<--|||
C     IM_Key        Readpe    IMHistz5                               81
|||

|||
C                   If        AJABMO = 'TW' and AJAD0A <> *blanks
<-||||
C                   Eval      Last_Location = AJAD0A
||||
C                   Endif
<-||||

|||
C                   Enddo
<--|||

||
C                   Endif
<---||
C                   Leave
|
C                   Endif
<----|
C                   Enddo
C                   Endsr
I am debugging the record after the READE (I manually read four records) but I
just see the values of the fields that I mention in the calculations
specifications: AJAAFZ, AJACJS, AJABMO and AJAD0A.  Notice that this record
layout has 89 fields!  Besides these four, everybody else has *Zeros or *Blanks.

What is going on?

Peter Vidal
PALL Aeropower Corp.
Senior Programmer Analyst



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.