IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to issue multiple SEND TEXT requests to terminal


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Wed Mar 04, 2009 3:34 pm
Reply with quote

I want to send long message to the Terminal. I think con't possible using one SEND TEXT command.. I hope it's possible by using multiple SEND TEXT commands to send long messages to the terminal(same screen). I need to know how to make this possible.


I have written code like below.. But it's not working. Getting first message only. Please help me out to get all the 3 message on same screen/

Code:
MOVE '                   Application Name       '
                                   TO WS-MESSAGE.           
EXEC CICS SEND TEXT                                         
         FROM (WS-MESSAGE)                                 
         LENGTH(WS-MESSAGE-LX)                             
         ERASE                                             
         END-EXEC.                                         
                                                           
EXEC CICS RETURN                                           
         END-EXEC.                                         
MOVE '                                                     '
                                   TO WS-MESSAGE.           
EXEC CICS SEND TEXT                                         
         FROM (WS-MESSAGE)                                 
         LENGTH(WS-MESSAGE-LX)                             
         END-EXEC.                                         
                                                           
EXEC CICS RETURN                                           
         END-EXEC.                                         
MOVE 'PLEASE CONTACT THE IT HELP DESK to get the NFORMATIO
      'N.THANK YOU!' TO WS-MESSAGE.                         
EXEC CICS SEND TEXT                                         
         FROM (WS-MESSAGE)                                 
         LENGTH(WS-MESSAGE-LX)                             
         END-EXEC.                                         
                                                           
EXEC CICS RETURN                                           
         END-EXEC.                                         


Thanks,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Mar 04, 2009 6:03 pm
Reply with quote

Your code sends a single text message, then returns to CICS. It sends another text message (which as the code is written will never be sent), then returns to CICS. It sends yet another text message (which as the code is written will never be sent), then returns to CICS. Why are you doing all the EXEC CICS RETURN END-EXEC commands?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 04, 2009 6:24 pm
Reply with quote

sureshbabu.jv wrote:
I want to send long message to the Terminal. I think con't possible using one SEND TEXT command.. I hope it's possible by using multiple SEND TEXT commands to send long messages to the terminal(same screen). I need to know how to make this possible.

Make WS-MESSAGE 1920 (80 bytes per line times 24 lines per screen) bytes long and:
Code:
MOVE 240                           TO WS-MESSAGE-LX.
MOVE '                                                     '
                                   TO WS-MESSAGE.           
MOVE '                   Application Name       '
                                   TO WS-MESSAGE(1:80).           
MOVE 'PLEASE CONTACT THE IT HELP DESK to get the NFORMATIO
      'N.THANK YOU!'               TO WS-MESSAGE(161:80).                         

EXEC CICS SEND TEXT                                         
         FROM (WS-MESSAGE)                                 
         LENGTH(WS-MESSAGE-LX)                             
         ERASE                                             
         END-EXEC.                                         
Back to top
View user's profile Send private message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Wed Mar 04, 2009 6:39 pm
Reply with quote

I have passed EXEC CICS RETURN END-EXEC for last SEND TEXT command and tested. Got the last text message 'PLEASE CONTACT THE IT HELP DESK to get the NFORMATIO
'N.THANK YOU!' on SCREEN(TERMINAL).

Do i need to pass any other command in the SEND TEXT to get all 3 messages? Could you suggest me
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 04, 2009 6:47 pm
Reply with quote

sureshbabu.jv wrote:
Do i need to pass any other command in the SEND TEXT to get all 3 messages? Could you suggest me
Assuming your code does work, the second and third SEND is writing over the same line previously sent.
If you want three lines, send them all at the same time.
What is it that you do not understand about the previously supplied code sample?
Back to top
View user's profile Send private message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Wed Mar 04, 2009 7:40 pm
Reply with quote

The above code is not worked for me. I have compiled fine but got the TRANSACTION FAILED message while login application.


Could you tell me the working store declarations of above fields? Is there any to use multiple SEND TEXT commands to meet thsi requirement.

Thank you!
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 04, 2009 7:57 pm
Reply with quote

sureshbabu.jv wrote:
The above code is not worked for me. I have compiled fine but got the TRANSACTION FAILED message while login application.
What "TRANSACTION FAILED" message? A CICS message or an application message?
Quote:
Could you tell me the working store declarations of above fields?
Other than expanding WS-MESSAGE, all declarations are already yours.
Quote:
Is there any to use multiple SEND TEXT commands to meet thsi requirement.
Yes, there is another approach, imbed a SBA (set buffer address) in the front of your original WS-MESSAGE to get each send to land on a different line on the terminal screen.
Back to top
View user's profile Send private message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Wed Mar 04, 2009 8:05 pm
Reply with quote

Getting the messasge " Please wait, your request is being processed!
DFHAC2206 09:31:43 WTORCICS Transaction PM09 failed with abend PM)9. Updates
to local recoverable resources backed out.


What changes have to make in code to meet your second approach. I have gone through manual document for this problem. I have found that there is a way to use multiple SEND TEXT commands to send multiple messages. But don't know what syntax has to use for this.

Thank you!
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 04, 2009 8:14 pm
Reply with quote

Quote:
PM)9
I'll assume that that is a typo and the application abended with a user defined abcode of the terminal....
What code in the program would do this?
How long have you been programming in CICS?
Back to top
View user's profile Send private message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Thu Mar 05, 2009 2:24 pm
Reply with quote

I have used your's first concept with multiple SEND TEXT commands.. It's worked for me.

Thanks you!
Back to top
View user's profile Send private message
sel_ramji2009

New User


Joined: 18 Jul 2013
Posts: 18
Location: india

PostPosted: Thu Sep 26, 2013 2:37 pm
Reply with quote

Hi sureshbabu,
even i have the same issue .can you paste the code that is working fine for sending long error messages to the terminal ? it would be of great help !
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 26, 2013 6:48 pm
Reply with quote

Hello,

You do realize that you have replied to a topic that is more than 4 years old . . .

Suggest you re-read the entire topic and follow the MULTIPLE SEND TEXT commands.

It has been more than 2 years since sureshbabu.jv has posted anything. . .

d
Back to top
View user's profile Send private message
colin777

New User


Joined: 06 Jun 2013
Posts: 19
Location: Singapore

PostPosted: Wed Oct 02, 2013 9:36 am
Reply with quote

Hi,
I have followed this thread and wonder why do you use the SEND TEXT which is a BMS CICS command for your multi line message. Why not just send a native Terminal Control SEND.

The following will work for you :

Code:
       WORKING-STORAGE SECTION.                                     
      *                                                             
       01      WS-TEXT-TO-SCREEN.                                   
               03      1ST-MESSAGE          PIC X(80) VALUE         
                               'THE 1ST LINE MESSAGE HAS BEEN SENT'.
               03      2ND-MESSAGE          PIC X(80) VALUE         
                               'THE 2ND LINE MESSAGE HAS BEEN SENT'.
               03      3RD-MESSAGE          PIC X(80) VALUE         
                               'THE 3RD LINE MESSAGE HAS BEEN SENT'.
               03      4TH-MESSAGE          PIC X(80) VALUE         
                               'THE 4TH LINE MESSAGE HAS BEEN SENT'.


Code:
      PROCEDURE DIVISION.                   
     *                                     
      A100-MAINLINE.                       
     *--------------                       
             EXEC CICS SEND                 
                     FROM(WS-TEXT-TO-SCREEN)
                     ERASE                 
                     NOHANDLE               
             END-EXEC.                     
             EXEC CICS RETURN               
             END-EXEC.                     
            GOBACK.                         
     *                                     


All of the above 4 lines will be sent to the terminal and line up nicely

HTH

Colin777

Code'd
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top