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

How to locate error flaged lines in initial macro?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Fri Jul 22, 2011 5:40 pm
Reply with quote

Hi,
Is there any other way or command to display the line with an error flag after locating it using LOCATE FIRST ERROR command in initial macro as I can not use DISPLAY_LINES command in this case.

Regards,
Dubasir.
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Mon Jul 25, 2011 10:36 am
Reply with quote

Even I cannot locate the error lines using LOCATE command in this case.
Please tell me how can I locate the error lines.

Regards,
Dubasir.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Jul 25, 2011 11:54 am
Reply with quote

It might help if we knew where you wanted to find these error flags and how you propose to find them.

icon_rolleyes.gif

You just missed psychic day...

Garry.
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Mon Jul 25, 2011 12:13 pm
Reply with quote

dubasir wrote:
Hi,
Is there any other way or command to display the line with an error flag ...

I don't understand what you mean by "display the line". In the Edit macro manual you can read "Remember that commands referencing display values (DISPLAY_COLS, DISPLAY_LINES, DOWN, LEFT, RIGHT, UP, LOCATE) are invalid in an initial macro because no data has been displayed".
You cannot display a line before ISPF Edit itself has displayed the data. What process caused the lines to be flagged as erroneous? If this is your own initial macro too, then what is the real problem?
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Mon Jul 25, 2011 2:22 pm
Reply with quote

I am calling a macro using ISPEXEC EDIT DATASET command as I wanted to edit a dataset/ member in background.
In the macro, I am performing some string replacement because of which we might get error flaged lines (If the line exceeds the reclengh after replace). So, i wanted to locate these error lines (==ERR) and do some process on these lines.
As it is an initial macro, I can not use LOCATE command to locate them. So, is there any alternative to do this?

Regards,
Dubasir.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jul 25, 2011 2:25 pm
Reply with quote

Yes, read the line to be changed and calculate if the changed length is going to cause an error and act accordingly.
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Mon Jul 25, 2011 2:36 pm
Reply with quote

Yes, we can do this way. But, Can't we do it in other way like first replace all, then get the each error line and do the required process?

Regards,
Dubasir.
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Mon Jul 25, 2011 3:05 pm
Reply with quote

dubasir wrote:
Yes, we can do this way. But, Can't we do it in other way like first replace all, then get the each error line and do the required process?

No, you can't do this. When you use "change all" then ISPF Edit only returns a return code. So I propose to use "change" in a loop on every line and check the return code on each turn. Thus you get the unsuccessful changes (regardless of the reason) and can process the line as desired.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jul 25, 2011 4:50 pm
Reply with quote

You might find this topic, "Problem in string replace in PDS members", useful. Since it is only two topics away from yours I'm going to put in the equivalent amount of effort and not put in the link. Same forum, two posts away.

After all that, I hope it does help :-)
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts PRINTOUT macro PL/I & Assembler 0
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top