Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 25
Location: Mumbai

PostPosted: Mon May 24, 2010 12:30 pm    Post subject: Sort in VSAM dataset where i/p and o/p are same dsn
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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon May 24, 2010 12:48 pm    Post subject:
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: 25
Location: Mumbai

PostPosted: Mon May 24, 2010 3:25 pm    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon May 24, 2010 3:32 pm    Post subject:
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

Site Director


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

PostPosted: Mon May 24, 2010 7:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us