Announcement

Collapse
No announcement yet.

Display file using a message file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display file using a message file

    Morning,
    I have to update a program written by a cave man. It was originally a S36 RPG program but has been converted using the convert source utility.

    There is a display file which uses messages from a message file. The appropriate message id for each error as found in the RPG is passed as a character field to a field defined in the DDS like this '0212U1'.

    Now, from what I have picked up from the IBM DSPF manual, the first 4 are the USR msg id and the U1 indicates that first level message text should be returned.

    In the display file, there is an output field (ERROR) with these keywords; DSPATR(RI) with indicator 91 on the line. MSGID(&MIC001 HISLIB/HISMSGF) with indicator 91 on the line. Another keyword MSGID(*NONE) without the indicator and a defined field called MIC001 7A P. (Indicator 91 is seton in the program when an error is encountered.)

    Now, apparently something is missing somewhere because when there's an error, the screen shows the ERROR field in reverse image and rather than the first level message text, it only shows the passed value '0319??' (or whatever the specific id is for the error encountered but always with 2 question marks at the end)

    I've located the message file and it is in the library list.

    I cannot express how much time I waste every time someone enters an invalid value on in a field and I have to stop what I'm doing to search the program for the code displayed in the ERROR field to tell them what they did wrong. Did I mention that there are no PC keywords used on any of the fields, that's right. The cursor goes to the first input field when there's an error and the same code can be used in multiple places in the program. It's a ton of fun!

    Anyone out there familiar with this setup and can tell me what's missing?

    Mike.
    Everyday's a school day, what grade are you in?

  • #2
    Since the program is running natively (not running in the S/36 environment), the MIC001 variable has to contain the 7 character message ID. Assuming the message IDs start with USR, the MIC001 variable should contain USR0212 before the record format is displayed. The U1 part is only used if the program is running in the S/36 environment.

    Comment

    Working...
    X