Display msglines



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Display msglines

Postby Julie » Tue May 24, 2011 2:08 pm

Hi,
my rexx program inserts msglines in a Cobol code and I want to navigate between the several message lines.
I know how to pass from a message to another using :
'isredit locate next msgline'               
if rc = 4 then 'ispexec setmsg msg(...)'

I wonder if I can return the msgline in the middle of the window (i.e. I show 5 lines of code before the msgline) rather than at the top of the window.
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display msglines

 

Re: Display msglines

Postby BillyBoyo » Tue May 24, 2011 2:59 pm

What does the manual say about setting the msgline?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Display msglines

Postby Julie » Tue May 24, 2011 5:24 pm

How can I get the line numbers of all msglines inserted in the cobol code ?
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display msglines

Postby Steve Coalbran » Tue May 24, 2011 7:03 pm

Hi Julie,
MSGLINEs don't have line numbers as they are not real, but "SPECIAL" lines.
I don't know of a way to FIND MSG lines unless you store the line before numbers and then you are in trouble if anyone inserts or deletes afterwards?
Steve
User avatar
Steve Coalbran
 
Posts: 103
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: Display msglines

Postby Steve Coalbran » Tue May 24, 2011 7:07 pm

OK - I just tried your code and it works in EDIT with a L next msgline. :D
I stand corrected (and informed!)
So why not...
ADDRESS ISREDIT
"LOCATE FIRST MSGLINE"
DO WHILE(RC=0)
   ...do something...
   "LOCATE FIRST MSGLINE"
END
Steve
User avatar
Steve Coalbran
 
Posts: 103
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: Display msglines

Postby Julie » Tue May 24, 2011 8:01 pm

Sorry I expressed myself badly. I know that MSGLINEs don't have line numbers. Indeed I want to get the line number of the line before .
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display msglines

Postby Steve Coalbran » Wed May 25, 2011 12:07 pm

Hi Julie
When I first tried it I located on the MSG fine but getting the line returned the top line of the data.
so ... it bugged me! I had to solve it. :geek:
Here's the solution ...
-IPT- EDIT SE16661.USER.EXEC(LOCMSGS) - 01.01              Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 /*REXX*/                                                               
000002 ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 
000003 ADDRESS ISREDIT                                                         
==MSG> message line 1                                                         
000004 "MACRO NOPROCESS"                                                       
000005 "SEEK P'=' 1 FIRST"                                                     
000006 "LOCATE FIRST MSGLINE"                                                 
==MSG> message line 2                                                         
000007 DO WHILE(RC=0)                                                         
000008    "(ML) = LINE .ZCSR"                                                 
000009    "(LN) = LINENUM .ZCSR"                                               
000010    SAY RIGHT(ln,6,0) STRIP(ml,"T")                                                 
000011    "SEEK P'=' 1 NEXT"                                                   
000012    "LOCATE NEXT MSGLINE"                                               
==MSG> message line 3                                                         
000013 END                                                                     
****** **************************** Bottom of Data ****************************

OK, this is testing on itself (which can be fatal) but in this case we're OK.
As you can see I have just pushed 3 message lines into the code to try it out, giving them the inspired names of "message line n"!
This is what I get running on Montpellier Demo under IPT (not that that should be any different to anywhere else? :? )
000004 "MACRO NOPROCESS"
000007 DO WHILE(RC=0)   
000013 END               
***                     

and end up located on the bottom line (13) on the E of END..
-IPT- EDIT SE16661.USER.EXEC(LOCMSGS) - 01.01              Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
==MSG> message line 3                                                         
000013 END                                                                     
****** **************************** Bottom of Data ****************************
Steve
User avatar
Steve Coalbran
 
Posts: 103
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: Display msglines

Postby Steve Coalbran » Wed May 25, 2011 6:51 pm

I tried to improve on this today and the results from it prove to be quite inconsistent.
Sometimes one gets the correct lines below the messages and sometimes just the first n data lines where n is the number of messages! Odd?
I suspect that there is some missing factor!
Steve
User avatar
Steve Coalbran
 
Posts: 103
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 5 times
Been thanked: 1 time

Re: Display msglines

Postby Julie » Fri May 27, 2011 12:54 pm

Tahnk you Steve. I'm sorry I could not reply sooner.
I'll try to change your function and see if it can work. If I succeed I'll post my solution.
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display msglines

Postby Julie » Fri May 27, 2011 1:10 pm

...
Julie
 
Posts: 21
Joined: Tue May 03, 2011 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post