Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to locate error flaged lines in initial macro?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to locate error flaged lines in initial macro?
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    Post subject: How to locate error flaged lines in initial macro?
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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Jul 25, 2011 11:54 am    Post subject:
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    Post subject: Re: How to locate error flaged lines in initial macro?
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    Post subject: Reply to: How to locate error flaged lines in initial macro?
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: 1788
Location: UK

PostPosted: Mon Jul 25, 2011 2:25 pm    Post subject:
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    Post subject: Reply to: How to locate error flaged lines in initial macro?
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    Post subject: Re: Reply to: How to locate error flaged lines in initial ma
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Jul 25, 2011 4:50 pm    Post subject: Reply to: How to locate error flaged lines in initial macro?
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 1 Mon May 29, 2017 8:10 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us