I usually use a combination of SEU and SDA to create display files for the AS/400 (SEU to copy similar display formats from existing code and SDA to easily add or change attributes, positioning, etc.). This Gotcha occurred when I was modifying an existing display file that utilized a subfile.
While in SEU, I copied the line of code containing a SFLRCDNBR keyword and its associated field into my subfile control record and, not noticing that this was a field-level keyword, placed it prior to a group of about 20 SFLMSG error messages (which are file-level keywords).
I then exited SEU to modify the display file using SDA. The syntax checker showed no errors coming into SDA, so after making my enhancements I exited and created both the display file and the modified RPG program that uses the display.
While testing the program I noticed that the error messages generated by the SFLMSG statements were not displaying. I looked at the source code for the display file and noticed that the SFLMSG statements were gone. Apparently when I entered SDA (with no errors flagged), changed the subfile control record format (with field-level statements prior to file-level statements), and exited, SDA conveniently removed the offending source code and neglected to tell me.
Further limited testing revealed that if a field-level keyword (e.g., COLOR, DSPATR) is specified without a prior field definition to relate to it and the record format is modified and saved, then SDA will remove these field-level statements from your source without giving you any warning of the error when loading the display file into SDA.
Also, any file-level statements following the first occurrence of a field definition will be removed by SDA unless the keyword is required by the format (e.g., subfile control record formats require the keywords SFLCTL, SFLDSP, SFLPAG and SFLSIZ). SDA will flag this situation as an error.
LATEST COMMENTS
MC Press Online