View previous topic :: View next topic
|
Author |
Message |
manikandanjs
New User
Joined: 02 Jun 2006 Posts: 27 Location: Blue Bell, PA
|
|
|
|
Hi,
I want to delete a particular line based on the specific string which is present in the member of a PDS file.
EX:
The following needs to be deleted using string "Manikandan"
//LINE01 DD DSN=MANIKANDAN.IBM,DISP=SHR
Thanks
Manikandan[/code] |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You will either need to use an ISPF edit macro - great when there are loads of members to process.
Or a REXX to read the file in, scan for the required field, and either output the line or not depending on the scan results. |
|
Back to top |
|
|
manikandanjs
New User
Joined: 02 Jun 2006 Posts: 27 Location: Blue Bell, PA
|
|
|
|
I don't have much knowledge on REXX. Is there anyother way to do it.
i want to delete a particular line with out opening the member since there are so many member in PDS. The process has to be done on all the members |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
manikandanjs wrote: |
I don't have much knowledge on REXX. Is there anyother way to do it. |
Then WHY did you post this to the CLIST/REXX forum? What programming language and/or utilities DO you want to use? |
|
Back to top |
|
|
manikandanjs
New User
Joined: 02 Jun 2006 Posts: 27 Location: Blue Bell, PA
|
|
|
|
Sorry i didn't see that. Can we do Using COBOL/JCL? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
manikandanjs wrote: |
I don't have much knowledge on REXX. Is there anyother way to do it.
i want to delete a particular line with out opening the member since there are so many member in PDS. The process has to be done on all the members |
How do you think that you can update a file without opening it ?
Basic REXX is quite easy to learn. Here's a very basic REXX to find all of the members in a PDS. That should get you well on the way.
Take a look at the manuals links from this forum and from the ISPF forum, and when you hit some problems, post them here with your code and the error messages.
Code: |
/* REXX */
PDS = "'your PDS name'"
X=OUTTRAP(LIST.)
"LISTDS " PDS " MEM "
X=OUTTRAP(OFF)
SAY "MEMBERS IN PDS = "LIST.0 - 6
DO A = 7 TO LIST.0
SAY LIST.A
END
|
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Yes, Edit-Macros can be written in COBOL, and actually it is the best solution when the processing is big.
JCL is not a programming language, so you can't do that using JCL. However - you can invoke your edit session (with an Edit-Macro) in batch, using JCL.
O. |
|
Back to top |
|
|
|