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

finding which cobol paragaph we are in


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Fri Sep 12, 2008 9:43 pm
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
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
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: 206
Location: Bangalore

PostPosted: Wed Sep 17, 2008 2:38 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top