Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
finding which cobol paragaph we are in

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Fri Sep 12, 2008 9:43 pm    Post subject: finding which cobol paragaph we are in
Reply with quote

Hi,

Is there any command to know which cobol paragraph we are in depending on the current cursor location?

Many times while analysing the abend, we give a Find on the error message. Now here, the paragraphs are quite long. (generally contain a lot of commented code) and it requires a lot of F7 to reach the beginning of paragraph name in which the error message was present.

So, is there anyway to reach the beginnning of current paragph in which the error message is present?

Any ideas?

-Ajay
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Sep 12, 2008 9:55 pm    Post subject:
Reply with quote

Code:
x '*' 7 7 all          -- this will hide all the comments
f p'^' 8 11 nx prev        -- this will find the previous para or section name
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 12, 2008 10:08 pm    Post subject:
Reply with quote

Hi Ajay,

You may also want to put ".A" in the line your cursor is at before you do the "f"ind and use l .a to find your way back.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Wed Sep 17, 2008 2:38 am    Post subject: Reply to: finding which cobol paragaph we are in
Reply with quote

Quote:
f p'^' 8 11 nx prev -- this will find the previous para or section name


In my case,
f p'^'
is not working.

It says not found.

I went through ISPF qw help on find command and used the symbol having hex code of X'5F' on mainframe instead of '^' to refer to any non-blank character in the picture string. (This symbol is not appearing on the keyboard. That's why i am referring its hex code in the post).

So i used the below command
Code:
f p'special-symbol' 8 11 nx prev     


Where special-symbol is that symbol.

Thanks everybody!

-Ajay
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us