You are comparing TRANS_MM to &JUL_FROM and the formats aren't the same. Try changing
TRAN_DTE_MM/A2 = EDIT(TRAN_DTE_YMD,'$$99$$');
TRANS_MM/I2 = EDIT (TRAN_DTE_MM);
to
TRAN_DTE_MM/A4YM=EDIT(TRAN_DTE_YMD,'9999');
TRANS_MM/I4=EDIT(TRAN_DTE_MM);
I haven't gone through all of your code, if you are using TRANS_MM elsewhere in the program where you want only the month you will need to add another field. If you add another field be sure to change all of your defined fields to use the new field.
I would recommend that you get additional FOCUS training. A WebFocus class using the GUI tools WILL NOT HELP YOU, for the mainframe you have to learn the code. Also make sure that you have a copy of the FOCUS developers manuals for your system, a hard copy would be best. The manuals are available from Information Builders for a fee. Most of the manuals are available as PDF downloads from tech support.
Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes