× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm sorry, I'm have nothing else to offer.  Maybe Someone else does.

Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx


                                                                           
             "Imtiaz Ahmed"                                                
             <iahmed@dollargen                                             
             eral.com>                                                  To 
                                       <Michael_Schutte@xxxxxxxxxxxx>      
             03/23/2006 04:38                                           cc 
             PM                                                            
                                                                   Subject 
                                       RE: Issue with SNDUSRMSG not        
                                       breaking for response.              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




I appreciate all your responses. SNDPGMMSG is working fine. I still have an
issue with SNDUSRMSG currently being used in an existing program. If need
be I can work around this but need to know why this is not working. I have
tried all your suggestions but for some odd reason SNDUSRMSG is not working
for me. Can anyone please run the following code to see if breaks for a
response.

PGM        PARM(&MSG)
 DCL        VAR(&RPLY) TYPE(*CHAR) LEN(1)
 DCL        VAR(&MSG)  TYPE(*CHAR) LEN(99)

 SNDUSRMSG  MSG(&MSG) VALUES(Y) MSGTYPE(*INQ) +
              TOMSGQ(*SYSOPR) MSGRPY(&RPLY)

ENDPGM

Imtiaz M.Ahmed
Senior Programmer Analyst
Dollar General Corporation
100 Mission Ridge
Goodlettsville, TN 37072
615.855.4358
iahmed@xxxxxxxxxxxxxxxxx


-----Original Message-----
From: Michael_Schutte@xxxxxxxxxxxx [mailto:Michael_Schutte@xxxxxxxxxxxx]
Sent: Thursday, March 23, 2006 2:34 PM
To: Imtiaz Ahmed
Subject: RE: Issue with SNDUSRMSG not breaking for response.

Here's the full program on how to send a message with SNDPGMMSG and on how
to retrieve the response.

/*   '*¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤+
     'Bob Evans Farms, Inc.                                           +
     '                                                                +
     'Name........: OPCDEVRDY                                         +
     'Description.: This program will decide if the device passed     +
     '              is ready for processing.                          +
     '              For Example: I must determine if the tape drives  +
     '              (TAP06 & TAP07) are ready with tapes in them for  +
     '              the backup.                                       +
     '                                                                +
š     *---------------------------------------------------------------+
     '                                                                +
     'Written by..:^Michael Schutte'                                  +
     'Date........: 01/10/2006.                                       +
     'Mnt Request#: MSUN-6JTFG3                                       +
     '                                                                +
š     *---------------------------------------------------------------+
     'Notes:                                                         š+
š     *---------------------------------------------------------------+
     '                                                                +
š     *---------------------------------------------------------------+
     'Modifications:                                                 š+
š     *---------------------------------------------------------------+
     '                                                                +
     '*¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤  */
 PGM (&DEV &CANCEL)

     DCL &DEV       *CHAR 10
     DCL &CANCEL    *CHAR 1
     DCL &KEY       *CHAR 4  '    '
     DCL &REPLY     *CHAR 1  ' '
     DCL &REPLY_LEN *DEC (5 0)

     IF (&DEV *EQ '          ') RETURN
     CHGVAR &CANCEL ' '

RETRY:
     CHKTAP &DEV
     MONMSG (CPF6718 CPF6760) EXEC(DO)
        RESEND:
        SNDPGMMSG MSG(&DEV *BCAT 'does not appear to be ready. +
                      Please make sure there is a tape in the +
                      drive. (R=RETRY C=CANCEL)') +
                  TOMSGQ(*SYSOPR) MSGTYPE(*INQ) +
                  RPYMSGQ(*PGMQ) KEYVAR(&KEY)
        RCVMSG PGMQ(*SAME) MSGTYPE(*RPY) MSGKEY(&KEY) +
               WAIT(*MAX) RMV(*NO) MSG(&REPLY) MSGLEN(&REPLY_LEN)
        IF (&REPLY_LEN *GT 1) GOTO RESEND
        IF (&REPLY *NE 'R' *AND &REPLY *NE 'C' *AND +
            &REPLY *NE 'r' *AND &REPLY *NE 'c') GOTO RESEND
        IF (&REPLY *EQ 'R' *OR &REPLY *EQ 'r') GOTO RETRY
        CHGVAR &CANCEL 'Y'
        RETURN
     ENDDO
     MONMSG (CPF0000) EXEC(DO)
        RESEND2:
        SNDPGMMSG MSG('Unexpected error occurred while +
                       checking the tape in' *BCAT &DEV *BCAT '. +
                       Please check the drive and verify a tape +
                       is in there. (R=RETRY C=CANCEL)') +
                  TOMSGQ(*SYSOPR) MSGTYPE(*INQ) +
                  RPYMSGQ(*PGMQ) KEYVAR(&KEY)
        RCVMSG PGMQ(*SAME) MSGTYPE(*RPY) MSGKEY(&KEY) +
               WAIT(*MAX) RMV(*NO) MSG(&REPLY) MSGLEN(&REPLY_LEN)
        IF (&REPLY_LEN *GT 1) GOTO RESEND2
        IF (&REPLY *NE 'R' *AND &REPLY *NE 'C' *AND +
            &REPLY *NE 'r' *AND &REPLY *NE 'c') GOTO RESEND2
        IF (&REPLY *EQ 'R' *OR &REPLY *EQ 'r') GOTO RETRY
        CHGVAR &CANCEL 'Y'
        RETURN
     ENDDO
     CHGVAR &CANCEL ' '
 ENDPGM

Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx



             "Imtiaz Ahmed"
             <iahmed@dollargen
             eral.com>                                                  To
                                       <Michael_Schutte@xxxxxxxxxxxx>
             03/23/2006 02:56                                           cc
             PM
                                                                   Subject
                                       RE: Issue with SNDUSRMSG not
                                       breaking for response.










Pasted below are the values and seems alright. Again any help will be
most appreciated. Thanks,


User profile . . . . . . . . . . . . . . . :   QSYSOPR

                                       Storage information:

   Maximum storage allowed  . . . . . . . . :   *NOMAX

   Storage used . . . . . . . . . . . . . . :   7272

   Storage used on independent ASP  . . . . :   *NO

 Highest scheduling priority  . . . . . . . :   0

 Job description  . . . . . . . . . . . . . :   QDFTJOBD

   Library  . . . . . . . . . . . . . . . . :     QGPL

 Accounting code  . . . . . . . . . . . . . :

 Message queue  . . . . . . . . . . . . . . :   QSYSOPR

   Library  . . . . . . . . . . . . . . . . :     QSYS

 Message queue delivery . . . . . . . . . . :   *BREAK

 Message queue severity . . . . . . . . . . :   40

 Output queue . . . . . . . . . . . . . . . :   *WRKSTN

   Library  . . . . . . . . . . . . . . . . :

 Printer device . . . . . . . . . . . . . . :   *WRKSTN



                            Display Job Description

Job description:   QDFTJOBD       Library:   QGPL

User profile . . . . . . . . . . . . . . . . . . :   *RQD

 CL syntax check  . . . . . . . . . . . . . . . . :   *NOCHK

 Hold on job queue  . . . . . . . . . . . . . . . :   *NO

 End severity . . . . . . . . . . . . . . . . . . :   30

 Job date . . . . . . . . . . . . . . . . . . . . :   *SYSVAL

 Job switches . . . . . . . . . . . . . . . . . . :   00000000

 Inquiry message reply  . . . . . . . . . . . . . :   *RQD

 Job priority (on job queue)  . . . . . . . . . . :   5

 Job queue  . . . . . . . . . . . . . . . . . . . :   QBATCH

 Library  . . . . . . . . . . . . . . . . . . . :     QGPL

 Output priority (on output queue)  . . . . . . . :   5

 Printer device . . . . . . . . . . . . . . . . . :   *USRPRF

 Output queue . . . . . . . . . . . . . . . . . . :   *USRPRF

 Library  . . . . . . . . . . . . . . . . . . . :






Imtiaz M.Ahmed
Senior Programmer Analyst
Dollar General Corporation
100 Mission Ridge
Goodlettsville, TN 37072
615.855.4358
iahmed@xxxxxxxxxxxxxxxxx


-----Original Message-----
From: Michael_Schutte@xxxxxxxxxxxx [mailto:Michael_Schutte@xxxxxxxxxxxx]

Sent: Thursday, March 23, 2006 12:24 PM
To: Imtiaz Ahmed
Subject: RE: Issue with SNDUSRMSG not breaking for response.

You may also want to check the Job Description for the QSYSOPR.  To find
the job description for QSYSOPR check the DSPUSRPRF.  Then check the job
description's "Inquiry Message Reply".  It should be *RQD.    DSPJOBD
&LIB/&JOBD



(Embedded image moved to file: pic17212.jpg)


Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx




             Michael_Schutte@b

             obevans.com

             Sent by:
To
             midrange-l-bounce         Midrange Systems Technical

             s@xxxxxxxxxxxx            Discussion

                                       <midrange-l@xxxxxxxxxxxx>


cc
             03/23/2006 01:07

             PM
Subject
                                       RE: Issue with SNDUSRMSG not

                                       breaking for response.

             Please respond to

             Midrange Systems

                 Technical

                Discussion

             <midrange-l@midra

                 nge.com>









Also, have you done this...

CHGMSGQ    MSGQ(QSYSOPR) DLVRY(*BREAK)

Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx



             "Imtiaz Ahmed"
             <iahmed@dollargen
             eral.com>
To
             Sent by:                  "Midrange Systems Technical
             midrange-l-bounce         Discussion"
             s@xxxxxxxxxxxx            <midrange-l@xxxxxxxxxxxx>

cc

             03/23/2006 12:37
Subject
             PM                        RE: Issue with SNDUSRMSG not
                                       breaking for response.

             Please respond to
             Midrange Systems
                 Technical
                Discussion
             <midrange-l@midra
                 nge.com>






Thanks for your response. I tried and still have the same results.
Please can someone use my code and do a quick run. Maybe my default
settings need to be changes.

Thanks again for your help.



Imtiaz M.Ahmed
Senior Programmer Analyst
Dollar General Corporation
100 Mission Ridge
Goodlettsville, TN 37072
615.855.4358
iahmed@xxxxxxxxxxxxxxxxx

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark Walter
Sent: Thursday, March 23, 2006 11:12 AM
To: Midrange Systems Technical Discussion
Subject: RE: Issue with SNDUSRMSG not breaking for response.

Your sending it to TOUSR(*SYSOPR), Try TOMSGQ(*SYSOPR)



Mark Walter
Senior Programmer/Analyst
IBM Certified RPG Developer
Hainey Business Systems
(717) 771-2362
mwalter@xxxxxxxxxxx
http://www.hbs-inc.com


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Imtiaz Ahmed
Sent: Thursday, March 23, 2006 11:50 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Issue with SNDUSRMSG not breaking for response.

Can any one please let me know what I am missing here? I am using a
simple CL program to send an inquiry message to QSYSOPR message queue.
It sends the message but does not wait for a response. I ran the program
in Debug and the &REPLY value returned is *N. I also tried with a MSGID
CPF9898 but still the same results. I did check the message queue
setting for QSYSOPR and the delivery option is set for *BREAK. Any help
in this regards is most appreciated.

>

>             PGM        PARM(&MSG)


>

>             DCL        VAR(&RPLY) TYPE(*CHAR) LEN(1)


>

>             DCL        VAR(&MSG)  TYPE(*CHAR) LEN(99)


>

>


>

>             SNDUSRMSG  MSG(&MSG) VALUES(Y) MSGTYPE(*INQ) +


>

>                          TOUSR(*SYSOPR) MSGRPY(&RPLY)


>

>


>

>             ENDPGM


>



Imtiaz M.Ahmed

Senior Programmer Analyst

Dollar General Corporation

100 Mission Ridge

Goodlettsville, TN 37072

615.855.4358

iahmed@xxxxxxxxxxxxxxxxx



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.