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
 

 

Query regarding disp parameter when file creation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Fri Aug 03, 2007 1:16 pm    Post subject: Query regarding disp parameter when file creation
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: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 03, 2007 1:40 pm    Post subject:
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: 1439
Location: Bangalore,India

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

In addition to expat's -

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

Senior Member


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

PostPosted: Fri Aug 03, 2007 2:19 pm    Post subject:
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: 130
Location: Guntur

PostPosted: Fri Aug 03, 2007 2:42 pm    Post subject:
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: 356
Location: New York

PostPosted: Fri Aug 03, 2007 4:35 pm    Post subject: Re: Query regarding disp parameter when file creation
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

Senior Member


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

PostPosted: Fri Aug 03, 2007 4:38 pm    Post subject:
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: 130
Location: Guntur

PostPosted: Fri Aug 03, 2007 5:45 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Aug 06, 2007 4:25 pm    Post subject:
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

Site Director


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

PostPosted: Mon Aug 06, 2007 9:13 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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