Input Trigger: PNMFOF is a file poller process that is triggerred by the appearance of PNM files (pnm_yyydddhhmmss.txt) in the EDR_RECEIPT_DIR directory Output Triggers: PNMFOF triggers the CLNFOF process to wait to delete PNM files until after all FOF files in the PNM files have been decompressed PN ZI CL DL Class -- -- -- -- ----- c n v _ pnm PNMFOF triggers the ZIPFOF Process PN ZI CL DL Class -- -- -- -- ----- c w _ _ fof For Duplicate PNM processing: ----------------------------- to indicate a duplicate PNM file PN ZI CL DL Class -- -- -- -- ----- d n d _ pnm manually insert an 's' in the PN stage to trigger PNMFOF to process a duplicate PNM file PN ZI CL DL Class -- -- -- -- ----- s n v _ pnm
INPUT: EDR_RECEIPT_DIR: pnm_yyydddhhmmss.txt - PNM files received from CCS tyyyydddhhmm.mrg-gz - compressed FOF Telemetry Files received from CCS OUTPUT: OPUS_OBSERVATIONS_DIR: 'pnm' class OSF's for FOF PNM files 'fof' class OSF's for FOF Telemetry files EDR_RECEIPT_DIR: pnm_yyydddhhmmss.txt_proc - Naming Convention of PNM files as they are being processed by PNMFOF pnm_yyydddhhmmss.txt_done - Naming Convention of PNM files after they have been successfully processed by PNMFOF pnm_yyydddhhmmss.txt_bad - Naming Convention of PNM files if PNMFOF encountered an error while processing them pnm_yyydddhhmmss.txt_duplicate - Naming Convention of PNM files that have been determined to be duplicates of previously received PNM files EDR_FOF_DIR: tyyyyddhhmm.mrg-gz - FOF Telemetry files moved here from EDR_RECEIPT_DIR
Pipeline Mode: pnmfof -p opus_definitions_dir:your.path -r pnmfof (in task line of resource file) where: -p = denotes path file specification follows -r = denotes resource file for the PNMFOF Process opus_definitions_dir:your.path = path file to use
!-------------------------------------------------------------------- ! ! PNMFOF RESOURCE FILE ! ! This file is used to construct the trigger, error, and success status ! fields in the observation status file. ! !--------------------------------------------------------------------- ! REVISION HISTORY !--------------------------------------------------------------------- ! MOD PR ! LEVEL DATE NUMBER User Description ! ----- -------- ------ ------ -------------------------------------- ! 000 05/29/98 36120 Ken S. Created ! 001 01/20/99 37507 Ken S. Process duplicate PNM files. ! 002 01/20/00 39109 Ken S. Set wait status for PNM osf when complete. ! 003 02/04/00 39164 Ken S. Implement shove option for duplicate data. ! 004 12/01/00 42449 Ken S. Accomodate CCS pushing FOF data. ! 005 10/24/01 44684 Goldst Standardized OPUS EDR pipeline version ! 006 01/30/02 45016 Goldst Corrected OK_TO_UPDATE_DATABASE ! 007 03/11/02 45016 Goldst Added OSF_TRIGGER1.DATA_ID ! 008 03/14/02 45016 Goldst Added FOF_DATA_ID ! 009 03/27/02 45016 Goldst Added "DANGLE" to keywords ! 010 03/29/02 45016 Goldst Changed per new requirement ! 011 04/04/02 45382 Goldst Removed LOG* keywords ! 012 04/08/02 45382 Goldst Added two new keywords ! 013 04/24/02 45016 Goldst Change "_" status to "©" character ! 014 07/18/02 46157 J.Baum Add file trigger for transferred files, add ! PNM_TEST_PNM state. !--------------------------------------------------------------------- PROCESS_NAME = pnmfof TASK = <pnmfof -p $PATH_FILE -r pnmfof> DESCRIPTION = 'Product notification message poller' SYSTEM = EDR CLASS = pnm DISPLAY_ORDER = 1 OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! Determined by path file INTERNAL_POLLING_PROCESS = TRUE FILE_RANK = 1 ! First Trigger FILE_OBJECT1 = *.txt ! File specification for polling FILE_DIRECTORY1 = EDR_RECEIPT_DIR ! FILE_OBJECT2 = *.txt_xfr ! Alternate file specification FILE_DIRECTORY2 = EDR_RECEIPT_DIR ! FILE_PROCESSING.DANGLE = _proc ! Extension addition during processing FILE_SUCCESS.DANGLE = _done ! Extension addition if normal processing FILE_ERROR.DANGLE = _bad ! Extension addition if error FILE_DUPLICATE.DANGLE = _duplicate ! Extension addition if duplicate OSF_RANK = 2 ! Second Trigger OSF_TRIGGER1.PN = s ! OSF being shoved through OSF_TRIGGER1.DATA_ID = pnm ! Trigger class ID OSF_PROCESSING.PN = p ! Set the processing flag to 'Processing' !PNM Success PNM_CREATE.PN = p !PNM file create status PNM_COMPLETE.PN = c !PNM file complete status PNM_COMPLETE.ZI = n !Not applicable to PNM processing PNM_COMPLETE.CL = v !PNM vaiting for cleanup (set by CLNFOF) PNM_TEST_PNM.PN = c !PNM - test file complete PNM_TEST_PNM.ZI = n !PNM - no zipping PNM_TEST_PNM.CL = w !PNM - test file ready for deletion PNM_DUPLICATE.PN = d !PNM file duplicate status PNM_DUPLICATE.ZI = n !PNM file duplicate status PNM_DUPLICATE.CL = d !PNM file duplicate status !############ DO NOT CHANGE THIS STATUS VALUE ###################### PNM_DUPLICATE.DL = © !Reset to "_" for PNM file duplicate status !#################################################################### PNM_FAIL.PN = f !PNM file failed status FOF_COMPLETE.PN = c !FOF file complete status FOF_COMPLETE.ZI = w !Reset for duplicate FOF processing !############ DO NOT CHANGE THESE STATUS VALUES ##################### FOF_COMPLETE.CL = © !Reset to "_" for duplicate FOF processing FOF_COMPLETE.DL = © !Reset to "_" for duplicate FOF processing !##################################################################### POLLING_TIME = 10 ! Wait (seconds) before polling for next PNMPATH = EDR_RECEIPT_DIR ! Find Product notificatiuon messages(PNM) here OUTPATH = EDR_FOF_DIR ! Move zipped FOF data here MINBLOCKS = 50000 ! blocks required on output disk ZIPPED_EXT = .mrg-gz ! Zipped file extension FOF_DATA_ID = fof ! Data ID for fof class OSFs ! forces values from path to be used ENV.OPUS_DB = OPUS_DB ENV.DSQUERY = DSQUERY
Input Trigger: ZIPFOF is triggerred by the PNMFOF Process PN ZI CL DL Class -- -- -- -- ----- c w _ _ fof Output Trigger: ZIPFOF triggers the CLNFOF Process PN ZI CL DL Class -- -- -- -- ----- c c w _ fof
INPUT: EDR_FOF_DIR: tyyyydddhhmm.mrg-gz - compressed FOF files OUTPUT: EDR_FOF_DIR: tyyyydddhhmm.mrg - name of decompressed FOF files while the decompression is occurring tyyyydddhhmm.fof - name of decompressed FOF files after the decompression is complete
using gzip interactively from command line: gzip -d <filename> example: gzip -d tyyyydddhhmm.mrg-gz Pipeline Mode: zipfof -p opus_definitions_dir:your.path -r zipfof (in task line of resource file) where: -p = denotes path file specification follows -r = denotes resource file for the ZIPFOF Process opus_definitions_dir:your.path = path file to use
!-------------------------------------------------------------------- ! ! ZIPFOF RESOURCE FILE ! ! ! This file is used to construct the trigger, error, and success status ! fields in the observation status file. ! ! !----------------------------------------------------------------------- ! REVISION HISTORY !----------------------------------------------------------------------- ! MOD PR ! LEVEL DATE NUMBER User Description ! ----- -------- ------ ------ ------------------------------------- ! 000 05/29/98 36120 Ken S. Created ! 001 11/03/99 39667 JSCHULTZ add OUTPATH and MINBLOCKS mnemonics ! 002 11/10/99 39598 JSCHULTZ delete FOFPATH mnemonic (OUTPATH now used) ! 003 12/01/00 42449 Ken S. Accomodate CCS pushing FOF data. ! 004 10/24/01 44684 Goldst Standardized OPUS EDR pipeline version ! 005 01/30/02 45016 Goldst Corrected OK_TO_UPDATE_DATABASE ! Added ENV.OPUS_DB, etc. ! 006 03/11/02 45016 Goldst Added OSF_TRIGGER1.DATA_ID !----------------------------------------------------------------------- PROCESS_NAME = zipfof TASK = <zipfof -p $PATH_FILE -r zipfof> DESCRIPTION = 'Unzip files from CCS' SYSTEM = EDR CLASS = fof DISPLAY_ORDER = 1 OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! Determined by path file INTERNAL_POLLING_PROCESS = TRUE OSF_RANK = 1 ! First Trigger OSF_TRIGGER1.PN = c ! OSF complete status OSF_TRIGGER1.ZI = w ! OSF next-step status OSF_TRIGGER1.DATA_ID = fof ! Trigger class ID OSF_PROCESSING.ZI = p ! OSF processing status FOF_COMPLETE.ZI = c ! FOF complete status FOF_COMPLETE.CL = w ! FOF next-step status FOF_FAIL.ZI = f ! OSF failed status POLLING_TIME = 10 ! Wait (seconds) before polling for next OUTPATH = EDR_FOF_DIR ! Directory containing unzipped FOF files MINBLOCKS = 400000 ! minimum blocks required on OUTPATH UNZIPPED_EXT = .mrg ! Unzipped file extension DONE_EXT = .fof ! Completed file ZIPPED_EXT = .mrg-gz ! Zipped file extension SWITCHES = '-d -v' ! gzip command switches ! forces values from path to be used ENV.OPUS_DB = OPUS_DB ENV.SPSS_DB = SPSS_DB
Input Triggers: CLNFOF is triggerred by the the ZIPFOF Process for 'fof' class OSFs PN ZI CL DL Class -- -- -- -- ----- c c w _ fof CLNFOF re-triggers itself for 'pnm' class OSFs (after initially being triggerred for a 'fof' class OSF by the zipfof process, if CLNFOF determines that all FOF files in a given PNM file have been decompressed, CLNFOF will trigger itself by inserting a 'w' into the CL stage for the associated PNM file) PN ZI CL DL Class -- -- -- -- ----- c n w _ pnm CLNFOF can be manually triggerred by inserting an 's' into the CL stage for a given 'pnm' class OSF (this will result in the deletion of the given PNM file and all of the FOF files listed in the PNM file) PN ZI CL DL Class -- -- -- -- ----- c n s _ pnm Output Triggers: CLNFOF triggers the EDRDEL process for 'fof' class OSFs PN ZI CL DL Class -- -- -- -- ----- c c c c fof CLNFOF triggers the EDRDEL process for 'pnm' class OSFs PN ZI CL DL Class -- -- -- -- ----- c n c c fof
INPUT: EDR_RECEIPT_DIR: pnm_yyydddhhmmss.txt_done - successfully processed PNM files to delete pnm_yyydddhhmmss.txt_duplicate - duplicate PNM files to delete tyyyyddhhmm.mrg-gz - FOF files contained in duplicate PNM files to delete OUTPUT: N/A
Pipeline Mode: clnfof -p opus_definitions_dir:your.path -r clnfof (in task line of resource file) where: -p = denotes path file specification follows -r = denotes resource file for the CLNFOF Process opus_definitions_dir:your.path = path file to use
!-------------------------------------------------------------------- ! ! CLNFOF RESOURCE FILE ! ! This file is used to construct the trigger, error, and success status ! fields in the observation status file. ! !------------------------------------------------------------------------ ! REVISION HISTORY !------------------------------------------------------------------------ ! MOD PR ! LEVEL DATE NUMBER User Description ! ----- -------- ------ ------ -------------------------------------- ! 000 05/29/98 36120 Ken S. Created ! 001 01/20/99 37507 Ken S. Process duplicate PNM files. ! 002 11/01/99 39597 JSCHULTZ add LOGPATH mnemonic ! 003 01/20/00 39109 Ken S. Add wait status. ! 004 10/24/01 44684 Goldst Standardized OPUS EDR pipeline version ! 005 01/30/02 45016 Goldst Corrected OK_TO_UPDATE_DATABASE ! 006 03/11/02 45016 Goldst Added OSF_TRIGGER1 and 2.DATA_ID ! 007 03/15/02 45016 Goldst Corrected PNM 2.DATA_ID (to pnm) ! 008 03/29/02 45016 Goldst Changed per new requirements ! 009 04/02/02 45016 Goldst Added FILE_DUPLICATE, FILE_DONE and ! EXTENSION !------------------------------------------------------------------------ PROCESS_NAME = clnfof TASK = <clnfof -p $PATH_FILE -r clnfof> DESCRIPTION = 'CLEANS files transfered from CCS' SYSTEM = EDR CLASS = all DISPLAY_ORDER = 1 OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! Determined by path file INTERNAL_POLLING_PROCESS = TRUE OSF_RANK = 1 ! First Trigger FOF OSF_TRIGGER1.PN = c ! OSF complete status OSF_TRIGGER1.ZI = c ! OSF complete status OSF_TRIGGER1.CL = w ! OSF next-step status OSF_TRIGGER1.DATA_ID = fof ! Trigger1 class ID OSF_RANK = 2 ! Second Trigger PNM OSF_TRIGGER2.PN = c ! OSF complete status OSF_TRIGGER2.ZI = n ! Not applicable to PNM processing OSF_TRIGGER2.CL = w ! OSF next-step status OSF_TRIGGER2.DATA_ID = pnm ! Trigger2 class ID OSF_RANK = 3 ! Third Trigger Clean duplicate files OSF_TRIGGER3.CL = s ! Trigger for file deletion OSF_TRIGGER3.DATA_ID = pnm ! Trigger3 class ID OSF_PROCESSING.CL = p ! Set the processing flag to 'Processing' FOF_COMPLETE.CL = c ! FOF Complete status FOF_COMPLETE.DL = c ! FOF trigger for osf deletion FOF_FAIL.CL = f ! FOF failed status PNM_WAIT.CL = w ! PNM wait status PNM_COMPLETE.CL = c ! PNM completion status PNM_COMPLETE.DL = c ! PNM trigger for osf deletion PNM_FAIL.CL = f ! PNM failed status FILE_DUPLICATE = _duplicate ! For building name of file to delete FILE_DONE = _done ! " EXTENSION = .txt ! " POLLING_TIME = 10 ! Wait (seconds) before polling for next PNMPATH = EDR_RECEIPT_DIR ! Directory of input files
OSF_TRIGGER1.DL = c - value of (DL) stage that triggers EDRDEL OSF_TRIGGER1.DATA_ID = pnm - class of OSF to delete OSF_TRIGGER2.DL = c - value of (DL) stage that triggers EDRDEL OSF_TRIGGER2.DATA_ID = fof - class of OSF to delete
Input Triggers: EDRDEL is triggerred by the the CLNFOF Process for 'pnm' class OSFs PN ZI CL DL Class -- -- -- -- ----- c n c c pnm EDRDEL is triggerred by the the CLNFOF Process for 'fof' class OSFs PN ZI CL DL Class -- -- -- -- ----- c c c c fof
INPUT: OPUS_OBSERVATIONS_DIR: 'pnm' and 'fof' class OSFs to be deleted OUTPUT: N/A
Pipeline Mode: osfdelete -p opus_definitions_dir:your.path -r edrdel (in task line of resource file) where: -p = denotes path file specification follows -r = denotes resource file for the EDRDEL Process opus_definitions_dir:your.path = path file to use
!-------------------------------------------------------------------- ! ! edrdel.resource ! ! Purpose: This file is used to construct the trigger, error, and ! success status fields in the observation status file. ! ! This resource file uses an OSF trigger. ! !-------------------------------------------------------------------- ! REVISION HISTORY !-------------------------------------------------------------------- ! PR ! DATE NUMBER User Description ! ------ ------ ------- ------------------------------ ! MOD PR ! LEVEL DATE NUMBER User Description ! ----- -------- ------ ------ ------------------------------------- ! 000 10/24/01 44684 Goldst Created initial version ! 001 03/12/02 45016 Goldst Added TRIGGER2 and DATA_ID !-------------------------------------------------------------------- PROCESS_NAME = edrdel TASK = <osfdelete -p $PATH_FILE -r edrdel> DESCRIPTION = 'Delete OSFs from the BB' SYSTEM = EDR CLASS = all DISPLAY_ORDER = 1 !--------------------------------------------------------------------------- ! EVNT resource. !--------------------------------------------------------------------------- OSF_RANK = 1 ! OSF event ordering. OSF_TRIGGER1.DL = c ! Archive completed will trigger OSF deletion OSF_TRIGGER1.DATA_ID = pnm ! Trigger1 class ID OSF_TRIGGER2.DL = c ! Archive completed will trigger OSF deletion OSF_TRIGGER2.DATA_ID = fof ! Trigger2 class ID POLLING_TIME = 5 ! Response time of the application !--------------------------------------------------------------------------- ! Application Specific resource !--------------------------------------------------------------------------- OSF_PROCESSING.DL = p ! letter to be used when an OSF is processed. OSF_ERROR.DL = e ! letter to be used when there is an error.
This relation is used to track the transfer and processing of FOF files designated by a PNM (Product Notification Message) from CCS. It is used to indicate what FOF files are contained within what PNM file; to determine if a given PNM file or FOF file had been previously received; i.e., is a duplicate; and to determine when all of the FOF files listed in a PNM file have been decompressed. The EDR Pipeline PNMFOF process is the process that inserts new records into this relation. PNMFOF provides values for all of the relations fields except the fof_complete_date field as it is the EDR Pipeline CLNFOF process that provides values for this field. Field name type/size description ---------- --------- ----------- pnm_name C17 PNM file name pnm_notification_date C22 PNM File notification Date in yyyy.ddd:hh:mm:ss.sss pnm_receipt_date C22 PNM File receipt Date in yyyy.ddd:hh:mm:ss.sss fof_name C15 FOF file name fof_transfer_date C22 FOF File transfer Date in yyyy.ddd:hh:mm:ss.sss fof_complete_date C22 FOF File competion Date in yyyy.ddd:hh:mm:ss.sss
This relation is used to identify the FOF engineering telemetry files that need to be converted to provide intermediary telemetry files containing telemetry parameters needed for FGS, GSA or AST product generation. It is used to simplify creation and collection of telemetry for processing. When a product has no eng_ready = N flags, then the OSF for the product can be created using the product rootname. The EDR Pipeline PNMFOF process uses this relation to indicate which FOF telemetry files have not yet been decompressed by the ZIPFOF process and thus are not ready to be processed by the EDPS FOF Conversion pipeline. Field name type/size description ---------- --------- ----------- product_rootname C14 IPPPSSOOT for jitter or astrometry products; GYYYYDDDHHMMSS for GS acquisition data product_type C3 FGS for jitter, AST for astrometry, or GSA for GS acqusition data eng_rootname C12 TYYYYDDDHHMM, rootname of the ENG telemetry file eng_ready C1 (Y/N), 'N' indicates the telemetry file eng_rootname is not yet recognized as ready for this product_type. 'Y' indicates that the processing for this product type has recognized the presence of eng_rootname. Having separate control for each product type simplifies initiation of processing. "
SELECT count(*) pnm_count FROM pnmfof_table WHERE fof_name = FOF_name
DELETE FROM pnmfof_table WHERE pnm_name = PNM_name AND pnm_notification_date = PNM_notification_date
SELECT count(*) pnm_count FROM pnmfof_table WHERE pnm_name = PNM_name AND pnm_notification_date = PNM_notification_date
INSERT pnmfof_table (pnm_name, pnm_notification_date, pnm_receipt_date, fof_name, fof_transfer_date, fof_complete_date) VALUES (PNM_name, PNM_notification_date, PNM_receipt_date, FOF_name, FOF_transfer_date, ' ')
UPDATE product_eng_map SET eng_ready = 'N' WHERE eng_rootname = FOF_name
UPDATE pnmfof_table SET fof_complete_date = FOF_complete_date WHERE fof_name = FOF_name AND pnm_name = ( SELECT MAX(pnm_name) FROM pnmfof_table WHERE fof_name = FOF_name )
SELECT pnm_name FROM pnmfof_table WHERE fof_name = FOF_name ORDER BY pnm_receipt_date
SELECT count(*) pnm_count FROM pnmfof_table WHERE pnm_name = PNM_name AND fof_complete_date < pnm_receipt_date