IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Deleting a particular line from the member of PDS file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Thu Jul 26, 2007 4:40 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 26, 2007 4:55 pm
Reply with quote

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
View user's profile Send private message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Thu Jul 26, 2007 5:56 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jul 26, 2007 5:59 pm
Reply with quote

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
View user's profile Send private message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Thu Jul 26, 2007 6:08 pm
Reply with quote

Sorry i didn't see that. Can we do Using COBOL/JCL?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 26, 2007 6:19 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jul 29, 2007 10:13 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top