CL checks for number of records in a file, if none, deletes file and sends a
message:

DCL  VAR(&NBRRCD) TYPE(*DEC) LEN(10 0)
RTVMBRD FILE(libname/filename) NBRCURRCD(&NBRRCD)
IF (&NBRRCD *EQ 0) THEN (DO)
   DLTF  libname/filename
   SNDBRKMSG MSG('No data exist') TOMSGQ(msgque)
ENDDO

> ----------
> From:         MacWheel99@aol.com[SMTP:MacWheel99@aol.com]
> Reply To:     MIDRANGE-L@midrange.com
> Sent:         Sunday, December 31, 2000 10:39 AM
> To:   BPCS-L@midrange.com; MIDRANGE-L@midrange.com
> Subject:      Facility RIP
> 
> We are closing one of our factories.
> 
> Different portions of the operations are having their files unpopulated in
> 
> stages so some reports cease to have meaning while others still need to be
> 
> run for the location that has one foot in the grave.
> 
> Some BPCS files automatically get cleaned up to remove old story during
> the 
> course of normal business fiscal operations, while some data will hang
> around 
> until infinity without MIS attention.
> 
> I also want to use this opportunity to help me identify old garbage
> records 
> that accumulate without proper purge, in need of enhancements to fiscal
> clean 
> ups.
> 
> Can someone point at a BPCS knowlegebase document of gotchas to watch out,
> 
> and useful tips & techniques, for when ending a portion of our business?  
> This is like the BPCS implementation poster flow chart in reverse.
> 
> I'd like to inventory what tools that may already exist to help diagnose
> what 
> records need to be purged, and actually purge them, to save us
> re-inventing 
> some wheels.
> 
> I'm creating some new reports to catch anything overlooked for designated 
> files, with facility granularity periodic count volume of active records 
> still there, because as people quit running certain reports on the old 
> factory, we can begin to have invisibility of data that should have been 
> removed.
> 
> Some in-house CL programs
> program-A gathers data to a work member 
> ***** my insert idea *****
> program-B report on the data gathered
> 
> My insert idea is ... if no data there ... abort the process & message
> user 
> so they know why
> I was looking for a CL tool to tell me when no data in a work memeber
> RTVMBRD (Retrieve Member Data)
> NBRCURRDC (Number Current Records)
> looks promising
> 
> I am also tempted to create a message file like QSYSOPR to get this count 
> down type stuff ... we are down to 2,000 customer orders to get properly 
> closed & however many inventory items to transfer or adjust.  Instead of 
> sending counts to a report, send them to the message file, so we can see
> how 
> we are doing.
> 
> MacWheel99@aol.com (Alister Wm Macintyre) (Al Mac)
> AS/400 Data Manager & Programmer for BPCS 405 CD Rel-02 mixed mode (twinax
> 
> interactive & batch) @ http://www.cen-elec.com Central Industries of 
> Indiana--->Quality manufacturer of wire harnesses and electrical 
> sub-assemblies - fax # 812-424-6838
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
> 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

This thread ...


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

This mailing list archive is Copyright 1997-2019 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].