VERIFIED SOLUTION i

How to write a program so that MailStream Plus jobs can use different Postal Reference Files

Operating System: Windows
 
This is for the Windows operating system (O/S).
MailStream Plus (MSP) does not have the functionality to automatically choose which month's PRF files to use for a specific mailing based on the mailing date.
It is possible to write a program so that MailStream Plus (MSP)  jobs can use different Postal Reference Files (PRF).  
This would be a customization of the code, so Technical Support would not able to assist in making or supporting the changes.

Here are some considerations if a person was going to write a program for this on the Windows platform:

The Mailing Date is normally defined by the RP INF (or EP INF or BATINF) parameter with the sub keyword M3DATE.
It can also be specified with the MDMFDD sub keyword.  You could use either of these or another method to determine what month's PRF files you want a job to use.

If you look in the MSP <jobname>.bat file, you can see the PRF variables are normally defined in this manner:
:: Postal Reference Files
SET DD_MSRFDC=%G1DB%\PRFDLVCT
SET DD_MSRFDI=%G1DB%\PRFDSTNM
SET DD_MSRFMC=%G1DB%\PRFMLCTL
SET DD_MSRFMP=%G1DB%\PRFRTMAP
SET DD_MSRFPS=%G1DB%\PRFPSTMT
SET DD_MSRFSQ=%G1DB%\PRFSQREF
SET DD_MSRFZD=%G1DB%\PRFZIPDR
SET DD_MSRFZM=%G1DB%\PRFZONES


So one way to be able to select the PRFs to be used would be to change the %G1DB% environment variable before running the job so-as to point to the folder where the month's files you want to be used are located..
An alternative way might be to always leave the %G1DB% variable the same, but have your program copy into that folder the 16 PRF files that you want to be used.

In the case where you may have multiple jobs running at the same time, and because of differing mailing dates, some jobs may need to use one month's PRF files and other jobs a different month's PRF files, then you may want to modify the <jobname>.bat file directly.  
In the list of SET statements above, your program could modify them for each job in real time, so that that specific job would point to the monthly PRF files in one folder to be used, while other job's SET statements could point to a different month's PRF files located in a different folder to be used.
UPDATED:  August 1, 2017