View previous topic :: View next topic |
Author |
Message |
JOHNCWL Beginner
Joined: 25 Feb 2004 Posts: 31 Topics: 16
|
Posted: Thu Apr 08, 2004 4:36 am Post subject: Delete the para |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Apr 08, 2004 5:43 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Apr 08, 2004 8:55 am Post subject: |
|
|
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Apr 12, 2004 4:02 am Post subject: |
|
|
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 |
|
|
RobertL Beginner
Joined: 18 Nov 2003 Posts: 22 Topics: 0 Location: Lisbon, Portugal
|
Posted: Mon Apr 12, 2004 11:40 am Post subject: |
|
|
Instead of doing DEL ALL X, try this.
It will cut only the non-excluded lines. They can then be pasted wherever you like.
Regards,
Robert |
|
Back to top |
|
|
JOHNCWL Beginner
Joined: 25 Feb 2004 Posts: 31 Topics: 16
|
Posted: Wed Apr 14, 2004 12:10 am Post subject: |
|
|
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 |
|
|
RobertL Beginner
Joined: 18 Nov 2003 Posts: 22 Topics: 0 Location: Lisbon, Portugal
|
Posted: Wed Apr 14, 2004 8:43 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Apr 14, 2004 12:15 pm Post subject: |
|
|
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 |
|
|
JOHNCWL Beginner
Joined: 25 Feb 2004 Posts: 31 Topics: 16
|
Posted: Wed Apr 14, 2004 11:12 pm Post subject: |
|
|
Any idea on how to achieve the same without using FILEAID, as I don't have this pgm in my shop... |
|
Back to top |
|
|
RobertL Beginner
Joined: 18 Nov 2003 Posts: 22 Topics: 0 Location: Lisbon, Portugal
|
Posted: Thu Apr 15, 2004 6:00 am Post subject: |
|
|
Hello John,
Try the edit macro I posted yesterday. It should work. No additional software required.
Regards,
Robert |
|
Back to top |
|
|
|
|