View previous topic :: View next topic
|
Author |
Message |
Uday Kumar R
New User
Joined: 07 Nov 2007 Posts: 27 Location: Mumbai
|
|
|
|
Hello,
I am using same vsam file(esds file) as input and output during a below sort process. I got the below error. The same sort card went successfully performed when i changed the o/p dsn to an another name.
I have went through the below link given by Frank in one of his replies regarding vsam processing in sort.
VSAM Considerations
Code: |
//STEP03 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=INPUT-FILE-ESDS
//SORTOUT DD DISP=SHR,DSN=INPUT-FILE-ESDS (updating same i/p file)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(4,5,CH,EQ,C'EWTRAN')
|
Error:
Code: |
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE183A 0 COND NOT MET TO USE THE SAME VSAM DATASET FOR SORTIN AND SORTOUT |
But while using same dataset name for in/p & o/p in FB format file rather than VSAM with the above sort card (INCLUDE COND=(1,5,CH,EQ,C'EWTRAN')), i am able to perform. Can you please suggest me where i went wrong? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
ICE183A suggests one of the following
o The application is a copy or merge
o NOVSAMIO is in effect
o NORESET is in effect
o The VSAM data set is not defined with REUSE
Garry. |
|
Back to top |
|
|
Uday Kumar R
New User
Joined: 07 Nov 2007 Posts: 27 Location: Mumbai
|
|
|
|
Hello Garry,
I tried with VSAMIO option as well. And i have used the option REUSE parameter during the VSAM creation aswell.
Code: |
//SYSIN DD *
OPTION VSAMIO,RESET
RECORD TYPE=V
SORT FIELDS=COPY
INCLUDE COND=(4,5,CH,EQ,C'EWTRAN') |
Even after that i am getting the same error.
Code: |
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE183A 0 COND NOT MET TO USE THE SAME VSAM DATASET FOR SORTIN AND SORTOUT |
|
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Did you see the first of the 4 reasons? It says you can't do a COPY - which is what the 3rd line of your control cards is saying.
In any case, it is highly inadvisable to use the same file for both input and output. If anything goes wrong - where's your backup?
Also, your INCLUDE is specified incorrectly. C'EWTRAN' is 6 char not 5 as you have coded.
Garry. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To echo Garry's observation a bit more strongly. . .
It is completely unacceptable to overwrite the input data. Any organization that has a proper promotion process will never allow this to be promoted to Production (unless the preceeding step is a backup).
Even if there is a backup, it is better to use the backup as input and overwrite the original file. |
|
Back to top |
|
|
|