|
|
| Author |
Message |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
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  |
|
| Back to top |
|
 |
References
|
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1965 Location: Israel
|
|
|
|
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 |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
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 |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3551 Location: Brussels once more ...
|
|
|
|
| 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 |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1965 Location: Israel
|
|
|
|
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 |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
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 |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3174 Location: italy
|
|
|
|
| what are the rules for extracting the lines ?? |
|
| Back to top |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
the lines are like a assigning value to variables.
As an example : CMPCLI1 = CLIT.. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3174 Location: italy
|
|
|
|
Nothing that a simple SRCHFOR wouldn' t be able to do  |
|
| Back to top |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
| 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 |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1965 Location: Israel
|
|
|
|
SRCHFOR = 3.14 = SUPERC = ISRSUPC
O. |
|
| Back to top |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
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 |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1965 Location: Israel
|
|
|
|
Well, at least for me it is not clear...
O. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3174 Location: italy
|
|
|
|
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 |
|
 |
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 191 Location: India
|
|
|
|
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 |
|
 |
|
|