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
 

 

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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am


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