View previous topic :: View next topic
|
Author |
Message |
sivasu_usavis
New User
Joined: 28 Jun 2006 Posts: 21 Location: Chennai
|
|
|
|
Is there any other way expect, Replacing the records other than record which going to delete then rename the same? |
|
Back to top |
|
|
sivasu_usavis
New User
Joined: 28 Jun 2006 Posts: 21 Location: Chennai
|
|
|
|
sivasu_usavis wrote: |
Is there any other way except, Replacing the records other than record which going to delete then rename the same? |
|
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
Quote: |
Is there any other way expect, Replacing the records other than record which going to delete then rename the same? |
Please elaborate your problem.
Regards
Rupesh |
|
Back to top |
|
|
vijayanand_cse
New User
Joined: 12 Jun 2006 Posts: 13 Location: Chennai
|
|
|
|
You can acheive it from your run jcl as follows:
//STEP0001 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=YOUR.DATASET
//SORTOUT DD DISP=SHR,DSN=YOUR.DATASET
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OMIT COND=XXX
/*
In COND field, you given whatever key field that you dont want.
Regards
Vijay |
|
Back to top |
|
|
sivasu_usavis
New User
Joined: 28 Jun 2006 Posts: 21 Location: Chennai
|
|
|
|
vijayanand_cse wrote: |
You can acheive it from your run jcl as follows:
//STEP0001 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=YOUR.DATASET
//SORTOUT DD DISP=SHR,DSN=YOUR.DATASET
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OMIT COND=TTT
/*
In COND field, you given whatever key field that you dont want.
Regards
Vijay |
thanks mr., but i have one little doubt, in that COND field how do we specify key field,since it is sequrntial data set. |
|
Back to top |
|
|
vijayanand_cse
New User
Joined: 12 Jun 2006 Posts: 13 Location: Chennai
|
|
|
|
Hi,
I will explain with an example. Your dataset may be sequential file but your data will have any (assumed) key field. That one is user defined.
Assume your following data:
-Name(10)- --DOB(6)-- --City(10)--
Sivasu 072282 Chennai
Vijay 092883 Chennai
Anand 092883 Chennai
If you dont want the record having name="Sivasu", the code will be like this:
//STEP0001 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=YOUR.DATASET
//SORTOUT DD DISP=SHR,DSN=YOUR.DATASET
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OMIT COND=(1,10,CH,EQ,'Sivasu')
/*
That is, it will delete all the records which contains the name 'Sivasu' in first 10 bytes.
Regards
Vijay |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Here is a REXX I wrote:
Code: |
/*------------------------------- REXX -------------------------------
* PROGRAM : EMPTYDSN
* FUNCTION : EMPTY DATASET
* AUTHOR : OFER
* DATE : 03/06/03
* HOW TO USE: X = EMPTYDSN(DSNAME) or as a 3.4 command
* :
*------------------------------------------------------------------*/
ARG DSN
IF DSN = ' ' THEN DO
EXITRC = 99
SIGNAL ENDEXEC
END
DSN = STRIP(DSN,"B","'")
D = OUTTRAP('DUMMY.')
ADDRESS TSO "REPRO INDA('"DSN"') OUTDA('"DSN"') COUNT(0)"
D = OUTTRAP('OFF')
EXITRC = RC
ENDEXEC:
EXIT EXITRC
|
O. |
|
Back to top |
|
|
sivasu_usavis
New User
Joined: 28 Jun 2006 Posts: 21 Location: Chennai
|
|
|
|
thanks vijay, for ur kind of explaination to my doubt... i'm fully clear with urs. i hope it ll make me more easier |
|
Back to top |
|
|
sivasu_usavis
New User
Joined: 28 Jun 2006 Posts: 21 Location: Chennai
|
|
|
|
could u make me more clear in "comp" clauses??? |
|
Back to top |
|
|
vijayanand_cse
New User
Joined: 12 Jun 2006 Posts: 13 Location: Chennai
|
|
|
|
Hi,
When you declare a data-item as comp, it leaves the choice of the data type to the compiler writer. The intent of this data type is to make it the most efficient format on any given machine, which is usually some binary format.
Regards
Vijay |
|
Back to top |
|
|
|