ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Need help getting the JOB description

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

  • Need help getting the JOB description

    I am trying to send a message break to myself using the following CL :
    Code:
    PGM                                                       
                 DCL        VAR(&JOBD) TYPE(*CHAR) LEN(10)    
    
                 RTVUSRPRF  USRPRF(*CURRENT) JOBD(&JOBD)      
     TEST:       SNDBRKMSG  MSG('TEST') TOMSGQ(&JOBD)         
    /*           MONMSG     MSGID(CPF0000)   */               
    ENDPGM
    After compiling the program and then running it I get the following error message:
    Job 850500/HYB/QPADEV0006 started on 12/12/19 at 09:42:33 in subsystem QINTE
    CPF2469 received by SNDMSGJOB at 202. (C D I R)

    I looked into the spool file for the cause and it does not indicate any severe error:

    Severity
    Total 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-79 80-89 90-99
    0 0 0 0 0 0 0 0 0 0 0

    Not sure what I am doing wrong.
    I appreciate any help on this topoc

  • #2
    Hi Matt,
    SNDBRKMSG command sends a message to a workstation device not to a job description as you do in your program.
    A workstation device is the name of the 5250 device you are logged in, usually something like QPADEVxxxx, and are those devices that you can list with command WRKCFGSTS *DEV.

    Also, when you receive a CPF message you can dig into it by skimming your job log (DSPJOB * -> opt. 10 -> F10 -> F18) : browsing the messages before CPF2469 you should see a CPF2421 diagnostic message which informs you that the message could not be send to <your job description name> because it's not a workstation.

    Hope it helps.

    Comment


    • #3
      Is it possible to retrieve the workstation device name using RTVUSRPRF ?

      Thank you mlstoppa

      Comment


      • #4
        No, the workstation you are working from is not an attribute of your user profile, it's related to your job instead.
        So, you can use RTVJOBA command to have the workstation name retrieved in JOB parameter.
        This will work if the job is a 5250 interactive session only.

        Hope it helps.

        Comment


        • #5
          Thanks again,

          This was helpful.

          Comment

          Working...
          X