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
 
How to retrieve a line from a program by running the rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
arund

New User


Joined: 25 Aug 2005
Posts: 1

PostPosted: Tue Aug 30, 2005 10:36 am    Post subject: How to retrieve a line from a program by running the rexx
Reply with quote

Hi,

How to retrieve a line from a program by running the rexx program.
For eg, say I have a code like this..

00001 Id Division.
00002 Program-Id. sample.
00003 envronment division.
and so on...
Now I want to get the string on line number 3 .. Is there any function for that..
Back to top
View user's profile Send private message

Ravi gaur

New User


Joined: 12 Jul 2005
Posts: 38

PostPosted: Tue Aug 30, 2005 11:44 am    Post subject: how to retrieve
Reply with quote

Arund make it more clear ,,

However Through EXECIO i mostly read records...
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Aug 30, 2005 1:21 pm    Post subject:
Reply with quote

I think that with a stem you will have some chance.
This is a sample:
Code:
"Execio * DiskR INPUT(Stem MySource. Finis"
Say MySource.3 /* envronment division. */


If you want to loop into your stem you can have this situation:

Code:
Do i = 1 To MySource.0 /*total of element in the stem MySource.*/
  Say MySource.i /* display your entire program line per line*/
End

Otherwise if you want to read in other way you can use Execio without Stem:
Code:
"Execio 0 DiskR INPUT(Open"
"Execio 1 DiskR INPUT 3"
"Execio 0 DiskR INPUT(Finis"


For more information you can see the Rexx Manual at this link:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IKJ4A350/10.3?DT=20040623084642
Back to top
View user's profile Send private message
dietocode

New User


Joined: 14 Nov 2005
Posts: 1
Location: Bangalore-India

PostPosted: Mon Nov 14, 2005 9:47 am    Post subject:
Reply with quote

Hi arun,
If your requirement is to pick the line of nuber what you have mentioned , all you need to do is have a counter and then go on performing reads until teh counter reaches the no you have set. Else teh easier way is to read the entire file into a stem and then only display stem.numberofyourchoice.Let me know if you need code snippet.
Back to top
View user's profile Send private message
sonipankaj

New User


Joined: 23 Nov 2005
Posts: 10

PostPosted: Thu Nov 24, 2005 8:36 pm    Post subject: Re: How to retrieve a line from a program by running the rex
Reply with quote

You can use Cursor position to read the data from that line.
[ADDRESS ISREDIT
"MACRO PROCESS"
"(LINEDATA) = LINE .ZCSR" ]
It will return the data of the line in which your cursor is placed.
It is used in Macro.
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Fri Aug 17, 2007 4:27 pm    Post subject:
Reply with quote

Hey,

Can somebody tell me how to figure out the line number, after i locate a particular text in a program.

Thanks....Rabin
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Fri Aug 17, 2007 5:41 pm    Post subject: Reply to: How to retrieve a line from a program by running t
Reply with quote

hi ,

if you are using an EDIT Macro then this code will work

‘ISREDIT (lnum) = LINENUM .ZL’

here lnum will consist the current line number.

Ctaram
Back to top
View user's profile Send private message
t_ctaram

New User


Joined: 15 May 2007
Posts: 20
Location: mumbai

PostPosted: Fri Aug 17, 2007 5:45 pm    Post subject:
Reply with quote

hi,

Cursor can also be used to locate the current position

ADDRESS ISREDIT
"(ROWNUM) = CURSOR"
SAY 'CURRENT ROW_NUM NUMBER IS :' ROWNUM

Ctaram
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Fri Aug 17, 2007 7:54 pm    Post subject:
Reply with quote

thanks.. i used the linenum & got the result..
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

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