Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 08 May 2006
Posts: 1004
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

Senior Member


Joined: 08 May 2006
Posts: 1004
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 Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us