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

Query regarding disp parameter when file creation


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Fri Aug 03, 2007 1:16 pm
Reply with quote

Hi all,

I have one query regarding disp parameter.

I have a declaration like this:
Code:

//dd1  dd  dsn=test.bala.file1,disp=(new,catlg,delete),
//            dcb=(lrecl=80,recfm=f,blksize=400,dsorg=ps),
//            unit=sysda,space=(trk,(10,15))


my query is the number of times i am trying to create the above file it is getting created successfully.

but what i expect is it should give error like file all ready exist.

can anybody explain me the reason behind this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 03, 2007 1:40 pm
Reply with quote

Do you have a delete step prior to the create step ?

Is it created with NOT CTLG 2 somewhere in the JESYSMSG ?

Does your shop have an exit to scratch any pre-existing dataset that has DISP=NEW ?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Aug 03, 2007 1:48 pm
Reply with quote

In addition to expat's -

Is the job abending?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 03, 2007 2:19 pm
Reply with quote

Or, are you using some step in your JCL, prior to this step, like this:
Code:
//STEP005 EXEC UCC11RMS,TYPRUN=F 
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Fri Aug 03, 2007 2:42 pm
Reply with quote

hi all,

i have not used any steps like

Quote:

//STEP005 EXEC UCC11RMS,TYPRUN=F


i am not getting any abend to my jcl.my jcl is running successfully

when i am trying to create dataset using 3.2 option in ispf

it is showing like duplicate name for dataset.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri Aug 03, 2007 4:35 pm
Reply with quote

Hi,

As Expat mentioned, you might be using DELETE step priot to the creation step. Just check is this happening in your JCL.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 03, 2007 4:38 pm
Reply with quote

Hi,

Then I would suggest you to show your JCL & the SYSOUT messages.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Fri Aug 03, 2007 5:45 pm
Reply with quote

below is my jcl :
Code:

//STEP02  EXEC PGM=SORT
//SORTIN   DD DSN=TEST.BALA.EXERCIS1,DISP=OLD
//SYSOUT   DD SYSOUT=*
//SORTOF01 DD DSN=TEST.BALA.FILEA,
//            DISP=(,CATLG,),UNIT=SYSDA,
//            SPACE=(CYL,(1,4),RLSE)
//SORTOF02 DD DSN=TEST.BALA.FILEB,
//            DISP=(,CATLG,DELETE),UNIT=SYSDA,
//            SPACE=(CYL,(1,4),RLSE)
//SORTOF03 DD DSN=TEST.BALA.FILEC,
//            DISP=(,CATLG,),UNIT=SYSDA,
//            SPACE=(CYL,(1,4),RLSE)
//SYSIN    DD *
      OPTION COPY
      OUTFIL FILES=01,INCLUDE=(46,2,CH,EQ,C'bs')
      OUTFIL FILES=02,INCLUDE=(1,6,CH,EQ,C'sp')
      OUTFIL FILES=03,INCLUDE=(1,6,CH,EQ,C'ap')
/*
//                 


in the jcl i am creating three files which are having some data in it,
but when i am doing some changes in the input file and trying to create
those three files with same name again they are getting created successfully and with updated data which i have changed in the input file.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Aug 06, 2007 4:25 pm
Reply with quote

Hi,

JCL looks ok, however, you could use DISP=SHR for SORTIN, if this is a stand alone JOB.

I usually use this type of code for my JOBs:
Code:
//JOBCARD
//STEP005 EXEC UCC11RMS,TYPRUN=F     
//*                                   
//STEP050  EXEC PGM=SORT,REGION=4096K
...
where STEP005 tells the OS to start a fresh run for this JOB. When tried the above JOB after commenting the //STEP005, there was a JCL error (JEM statistics) that SORTOUT already exist.

Can't guess what exactly happening at your end , we are missing something. Please show the SYSOUT messages as well.
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 Aug 06, 2007 9:13 pm
Reply with quote

Hello,

If you use tso/ispf 3.4 and list the dataset as 'TEST.BALA.FILE*', what does the system return? 3 files or more?

Your posted step is 02. What other steps are in the job?

Please run your job 2 times back-to-back and post the sysout info from both jobs.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top