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
 

 

Browse dataset using rexx
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Feb 27, 2008 11:52 am    Post subject: Browse dataset using rexx
Reply with quote

Hello All,
Requirement: I have 10 members in a dataset which contains different types of content in those 10 members. I would like to browse that dataset and write to another file if any member contains specific strings. I want to browse the entire member and in entire dataset.

If any through shed some light, it will great help to me.

Thanks,
Srini icon_smile.gif
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 27, 2008 12:35 pm    Post subject:
Reply with quote

I'm not sure what is your exact requirement...

- To search for a string in a PDS you can invoke SUPERC from within REXX, then read the output.
- To browse a dataset (sequential or a PDS member) from within REXX, you can use the ISPF service BROWSE.

O.
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Feb 27, 2008 5:26 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

we can use ISPF servies from rexx, but it will be helpful for me if you provide me sort of sample code.

I have 10 members in dataset. Each member i have to copy around 10 lines to another file. Like that i want to collect those 10 lines from each member in a dataset and copy to another file
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Feb 27, 2008 5:36 pm    Post subject:
Reply with quote

Quote:
we can use ISPF servies from rexx, but it will be helpful for me if you provide me sort of sample code.

I am sure that Ofer will give you a very competitive rate for his time coding and testing.

How do you decide which lines that you want to copy from each member ?

Does each member have a corresponding output dataset, or will all extracts go into one datatset ?

By browse a dataset / member, do you mean to open the dataset / member on your screen and manually search for strings, or do you want an ISPF edit macro to find the strings for you ?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 27, 2008 5:45 pm    Post subject:
Reply with quote

In this case, where only sample is needed, the fine manual will be sufficient. There are lots of examples in it.

O.
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Feb 27, 2008 5:54 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

Few lines of code in every member should go to only one output file.
For me it doesn't matter whether rexx browse the dataset or edit it.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 27, 2008 6:10 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

what are the rules for extracting the lines ??
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Feb 27, 2008 6:27 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

the lines are like a assigning value to variables.
As an example : CMPCLI1 = CLIT..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Feb 27, 2008 6:34 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

Nothing that a simple SRCHFOR wouldn' t be able to do icon_smile.gif
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Feb 27, 2008 6:45 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

If the search string is constant then we can for 3.14 but are you saying the same. SRCHFOR? If it is different please let me know the syntax
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 27, 2008 8:06 pm    Post subject:
Reply with quote

SRCHFOR = 3.14 = SUPERC = ISRSUPC

O.
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Feb 27, 2008 11:50 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

might be my fault that not able to clear my question.
I am not going search only one string. secondly each line is different in member itself and even with other members as well.

pls let me know if my question not clear
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Feb 28, 2008 1:31 am    Post subject:
Reply with quote

Well, at least for me it is not clear...

O.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Feb 28, 2008 1:37 am    Post subject: Reply to: Browse dataset using rexx
Reply with quote

why not submit a batch job
Code:
000002 //SEARCH  EXEC PGM=ISRSUPC,                                           
000003 //            PARM=(SRCHCMP,
000004 //            '')
000005 //NEWDD  DD DSN=Your.pds.dataset,
000006 //          DISP=SHR
000007 //OUTDD  DD SYSOUT=(A)
000008 //SYSIN  DD *
000009 SRCHFOR  'STRING1',WORD
000010 SRCHFOR  'STRING2',PREFIX
000011 SRCHFOR  'STRING3'
...... add as many as you need
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Thu Feb 28, 2008 11:36 am    Post subject: Reply to: Browse dataset using rexx
Reply with quote

Thanks much. I guess it's working. my problem not solved 100% but I got other with your suggestion.

Thank you very much
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 28, 2008 8:26 pm    Post subject:
Reply with quote

Hello,

Quote:
I guess it's working. my problem not solved 100%
If you take some time and show good examples of what you "have" and what you "want" your success rate will get closer to 100%.

You have provided very little to work with.
Back to top
View user's profile Send private message
cappucino

New User


Joined: 26 Nov 2007
Posts: 5
Location: chennai

PostPosted: Fri Jul 11, 2008 12:56 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

Dear friends, I have a requirement in Rexx. I need to read all members in a PDS which is starting with R and the member should be of 4 characters only.(e.g., RAAB, RAAC, etc.,) And, in each of those members, there will be one string say, DEST=(RMT09001). I need to copy the 8 characters RMT09001 and write in to a PS file the member name and the value in it(e.g., RAAB RMT09001
RAAC RMT09002 etc.,)?
. Could any one please help me out.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jul 11, 2008 1:00 pm    Post subject: Reply to: Browse dataset using rexx
Reply with quote

the fastest thing would be to run a search for saving the result to a dataset
and then write a small rexx to cleanup things
Back to top
View user's profile Send private message
cappucino

New User


Joined: 26 Nov 2007
Posts: 5
Location: chennai

PostPosted: Fri Jul 11, 2008 2:25 pm    Post subject:
Reply with quote

But that file needs to be given as input to another program. In a single jcl, that has to be executed sequentially. I need that REXX to be executed at each and every time of the job execution. Could u plz provide the REXX code for the same?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 11, 2008 2:37 pm    Post subject:
Reply with quote

Quote:
Could u plz provide the REXX code for the same?

My current rate for REXX code, test and documentation is 600 euro per day, but I am sure that you will get lower quotes for your requirement if you shop around.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


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