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
 
Deleting a particular line from the member of PDS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Deleting a particular line from the member of PDS file
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 26, 2007 4:55 pm    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Jul 26, 2007 5:59 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 26, 2007 6:19 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Sun Jul 29, 2007 10:13 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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