MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete the para

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
JOHNCWL
Beginner


Joined: 25 Feb 2004
Posts: 31
Topics: 16

PostPosted: Thu Apr 08, 2004 4:36 am    Post subject: Delete the para Reply with quote

Hi,
I would like to delete the lines which occur in the mid of file

CREATE DATABASE VVG1T01
BUFFERPOOL BP1
INDEXBP BP2
CCSID EBCDIC
STOGROUP VVG1T01 ;


This whole para needs to be deleted, I want to use macro for this ,

Any help
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Apr 08, 2004 5:43 am    Post subject: Reply with quote

Johncwl,

You can use TSO EDIT commands and delete the lines. Open the dataset in edit mode and issue the following commands.

Code:

 X ALL; F VVG1T01 ALL; DEL NX ALL;


Code:

 X ALL; F BUFFERPOOL ALL; DEL NX ALL;


Code:

 X ALL; F INDEXBP ALL; DEL NX ALL;


Code:

 X ALL; F CCSID ALL; DEL NX ALL;


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Apr 08, 2004 8:55 am    Post subject: Reply with quote

Ravi,

You can use the line command CC and use the tso command CREATE the member in a pds.

Code:

Command ===>  CREATE YOUR.PDS(MEM)                                                Scroll ===> CSR
****** ***************************** Top of Data ******************************
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  4 Line(s) not Displayed
CC0005   AA11Z11P                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  7 Line(s) not Displayed
000013   BB22Z22T                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  5 Line(s) not Displayed
000019   CC33Z22P                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  6 Line(s) not Displayed
000026   DD44Z44T                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
000030   EE55ZEEP                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  4 Line(s) not Displayed
000035   FF66Z66P                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  4 Line(s) not Displayed
000040   GG77Z77P                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  6 Line(s) not Displayed
000047   HH88Z88P                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
00CC51   II99Z99P                    --------- STRING(S) FOUND ----------------
- - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 22 Line(s) not Displayed


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Apr 12, 2004 4:02 am    Post subject: Reply with quote

Ravi,

You should get the required output if you do "del x all" on the output shown by Kolusu and then doing a copy and create/replace.

But if you don't want to use delete command then 'Edit' is probably not the solution.

Diba.
Back to top
View user's profile Send private message Send e-mail
RobertL
Beginner


Joined: 18 Nov 2003
Posts: 22
Topics: 0
Location: Lisbon, Portugal

PostPosted: Mon Apr 12, 2004 11:40 am    Post subject: Reply with quote

Instead of doing DEL ALL X, try this.
Code:
CUT .ZF .ZL NX

It will cut only the non-excluded lines. They can then be pasted wherever you like.
Regards,
Robert
Back to top
View user's profile Send private message
JOHNCWL
Beginner


Joined: 25 Feb 2004
Posts: 31
Topics: 16

PostPosted: Wed Apr 14, 2004 12:10 am    Post subject: Reply with quote

Hi Kolusu,

I can't use X ALL; F all
X ALL; F VVG1T01 ALL; DEL NX ALL;


Because VVG1T01 is the database name, and the whole file consists of the DDL sfor creatifn other objects in the database, Neither can I use X ALL;F Bufferpool, Because, I use this keyword for creating indexand tablespace also.

I want the follwoing to be included in the macro,

Once it finds 'CREATE DATABASE', then it has to delete the whole para till it encounters ";"
Back to top
View user's profile Send private message
RobertL
Beginner


Joined: 18 Nov 2003
Posts: 22
Topics: 0
Location: Lisbon, Portugal

PostPosted: Wed Apr 14, 2004 8:43 am    Post subject: Reply with quote

I haven't tested it, but try the following. It should be pretty close to what you need.

Code:
 /* rexx */               
 ADDRESS ISREDIT         
 'MACRO'                 
 "X ALL"                 
 "F ALL 'CREATE ' 1 72"   
 "F ALL X'5E' "           
 "F DATABASE NX FIRST "   
 DO WHILE RC=0           
   "LABEL .ZCSR = .A"     
   "F X'5E' NEXT NX "     
   "DEL .A .ZCSR"         
   "F DATABASE NX NEXT  "
   END                   
 'RESET'                 

Regards,
Robert
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Apr 14, 2004 12:15 pm    Post subject: Reply with quote

Johncwl,

If your shop has FILE-AID then the following JCL will give you the desired results. We are using the parameteres STOP, SPACE & IN which are explained briefly here.

The STOP parameter stops processing of a function when a specified criteria is met. The next function, if any, then begins processing with the record at which the stop occurred.

The SPACE function moves the current record pointer forward or backward (SPACEBACK), skipping over sections of any dataset, and positioning the pointer at a specific record for a subsequent function. This position is maintained only if the subsequent function processes the file in the same direction. Reversing the processing direction causes File-AID to reset the pointer to either the beginning or end of the file.

The IN parameter controls the number of input records that File-AID processes before stopping.

Code:

//STEP0100 EXEC PGM=FILEAID                           
//SYSPRINT DD  SYSOUT=*                               
//SYSLIST  DD  SYSOUT=*                               
//DD01     DD  *                                       
RECORD 1                                               
RECORD 2                                               
RECORD 3                                               
RECORD 4                                               
RECORD 5                                               
CREATE DATABASE VVG1T01                               
BUFFERPOOL BP1                                         
INDEXBP BP2                                           
CCSID EBCDIC                                           
STOGROUP VVG1T01 ;                                     
RECORD 6                                               
RECORD 7                                               
RECORD 8                                               
RECORD 9                                               
RECORD 10                                             
RECORD 11                                             
RECORD 12                                             
RECORD 13                                             
//DD01O    DD  SYSOUT=*                               
//SYSIN    DD  *                                       
$$DD01 COPY STOP=(1,EQ,C'CREATE DATABASE'),OUT=0       
$$DD01 SPACE STOP=(1,0,C';'),OUT=0                     
$$DD01 SPACE IN=1                                     
$$DD01 COPY                                           
/*


The output from this job is :
Code:

RECORD 1
RECORD 2
RECORD 3
RECORD 4
RECORD 5
RECORD 6
RECORD 7
RECORD 8
RECORD 9
RECORD 10
RECORD 11
RECORD 12
RECORD 13


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JOHNCWL
Beginner


Joined: 25 Feb 2004
Posts: 31
Topics: 16

PostPosted: Wed Apr 14, 2004 11:12 pm    Post subject: Reply with quote

Any idea on how to achieve the same without using FILEAID, as I don't have this pgm in my shop...
Back to top
View user's profile Send private message
RobertL
Beginner


Joined: 18 Nov 2003
Posts: 22
Topics: 0
Location: Lisbon, Portugal

PostPosted: Thu Apr 15, 2004 6:00 am    Post subject: Reply with quote

Hello John,
Try the edit macro I posted yesterday. It should work. No additional software required.
Regards,
Robert
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group