IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort in VSAM dataset where i/p and o/p are same dsn


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 27
Location: Mumbai

PostPosted: Mon May 24, 2010 12:30 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon May 24, 2010 12:48 pm
Reply with quote

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
View user's profile Send private message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 27
Location: Mumbai

PostPosted: Mon May 24, 2010 3:25 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon May 24, 2010 3:32 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 24, 2010 7:16 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top