× 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.



The following KILABTIK program is of type SQLRPG/400 written for BPCS 405CD to get rid of FLT labor tickets history prior to some date that is placed in the program, then it recompiled. The program hangs onto any history of ancient shop orders we still have, because orders can't purge if they can't find all their history.

FFLTL04  UF  E           K        DISK
FFSOL02  IF  E           K        DISK
I            DS
I                                      101 1060ORDBEG
I                                      106 1120ORDEND
C           *IN99     CASNE*ON       INIT$
C                     ENDCS

 C           *LOVAL    SETLLIPF600LT
 C           *IN93     DOWEQ*OFF
 *
 C           NEXT      TAG
 C                     READ IPF600LT               9393
  *
 C           *IN93     IFEQ *ON
 C                     GOTO QUIT
 C                     ENDIF

 C           TTDTE     IFGE 20051201
 C                     GOTO NEXT
 C                     ENDIF

 C           ORDBEG    IFLE TORD
 C           TORD      ANDLEORDEND
 C                     SETOF                     15
 C           TORD      CHAINIPF500SO             15
 C           *IN15     IFEQ *OFF
 C                     GOTO NEXT
 C                     ENDIF
 C                     ENDIF
  *
  * If deletion candidate ticket passed all inspection tests
 C                     DELETIPF600LT                   Current

  *
 C                     ENDDO
 C*  ----------------------------------------
 C           QUIT      TAG
 C                     MOVE *ON       *INLR
 C* =========================================
 CSR         INIT$     BEGSR
 C                     MOVE *ON       *IN99
 C                     MOVE *ON       *IN97
  *
  *         ---------------------- Identify Oldest Order -
  *
 C/EXEC SQL
 C+ SELECT MIN(SORD) INTO :ORDBEG
 C+ FROM FSO
 C/END-EXEC
  *
  *         ---------------------- Identify Newest Order -
  *
 C/EXEC SQL
 C+ SELECT MAX(SORD) INTO :ORDEND
 C+ FROM FSO
 C/END-EXEC
  *
  *
CSR ENDSR

The actual program has bunch of explanatory comments, relevant to our situations, which I am removing to just show you the actual code.

Remember, the rules are different for every file, every version of BPCS, every tailoring combination. You have to have a good understanding of how it all hangs together, before risk using someone else's code.

If a BPCS file has been accumulating data for years & you purge it for the first time, you might check if the disk space allocation is excessive ... know how to downsize the files.

This program scenario is relatively simple & straightforwards.
Not all BPCS files are this simple to resolve.

There is a purge program that comes with BPCS for FLT file.
We had several issues with the one we got, so we wrote our own version.
-
Al Mac

Would you consider sharing your code ?

Regards,
Sean McGovern



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.