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
 

 

Repro OUTFILE error
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 12:08 pm    Post subject: Repro OUTFILE error
Reply with quote

Hi,
Below is the code for copying PS file to VSAM file ..
Code:
//STEP1     EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=                                     
//INDD       DD DISP=SHR,DSN=XYZ.PS.FILE
//OUTDD    DD DISP=SHR,DSN=XYZ.VSAM.FILE                       
//SYSIN    DD *
  DELETE  XYZ.VAM.FILE CLUSTER PURGE                           
  IF MAXCC <=8 THEN SET MAXCC = 0                                       
  DEFINE    CLUSTER  (NAME(XYZ.VSAM.FILE)                -       
                      KEYS(6,0)                                 -       
                      RECORDSIZE(20,20)                         -       
                      REUSE                                     -       
                      TRACKS(45,15))                            -       
            DATA      (NAME(XYZ.VSAM.FILE)          -       
                      FREESPACE(10,15)                          -       
                      CISZ(8192))                               -       
            INDEX     (NAME(XYZ.VSAM.FILE))               
  REPRO INFILE(INDD)                                            -       
            OUTFILE(OUTDD)

when i execute this im getting an error :-
Code:
  REPRO INFILE(INDD)                       
        OUTFILE(OUTDD)                     
IDC3300I  ERROR OPENING G040700.EWK84001   
IDC3351I ** VSAM OPEN RETURN CODE IS 168   
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0 

BUT when i use OUTDATASET instead of OUTFILE the execution is successfull,
can anyone explain me why such error occured.
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri May 10, 2013 12:23 pm    Post subject:
Reply with quote

Code:
IDC3300I ERROR OPENING G040700.EWK84001
IDC3351I ** VSAM OPEN RETURN CODE IS 168


Is file open already or not closed?
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 May 10, 2013 12:41 pm    Post subject:
Reply with quote

With INFILE(ddname)/OUTFILE(ddname) keywords one can specify DISP=SHR in the JCL, which allows the command to run when the other Job/TSO-user using the dataset has the dataset allocated with shared access. If the other Job/TSO-user has dataset allocated with exclusive control, your Job will not run until other Job/TSO-user releases the dataset; if the other Job/TSO-user is not finished with the file you'll observe what you see.

When you use the INDATASET and OUTDATASET keywords, IDCAMS allocates the datasets with exclusive control and your Job works.

Last, please learn touse BBcode Tags - I've edited your post to add them.
Back to top
View user's profile Send private message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 12:43 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

The INDD file is closed, and its not in open mode also.
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 May 10, 2013 12:45 pm    Post subject:
Reply with quote

Just a guess - ISPF/START - on command line type (TSO) ISRDDN -- F 'your file' -- is it there?
Back to top
View user's profile Send private message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 2:40 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

using ISRDNN the file is not found , but in 3.4 i could see the file.
and my project requirement is to use INDD and OUTDD
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri May 10, 2013 2:55 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

the jcl posted
should have given the messages
Code:
IDC3013I DUPLICATE DATA SET NAME
IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEM-52
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12


because of ...
Code:
  DEFINE    CLUSTER  (NAME(XYZ.VSAM.FILE)                -       
........
            DATA      (NAME(XYZ.VSAM.FILE)          -       
........
            INDEX     (NAME(XYZ.VSAM.FILE))               


note the sloppiness of the TS in using the same name for the three <components> of the cluster

and what about the reference to ...
Code:
IDC3300I  ERROR OPENING G040700.EWK84001   
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri May 10, 2013 3:02 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

The duplicate names may be a "side-effect" of "masking" the names for posting - note the misplaced "-" for the continuations.

Can't say that I've used IDCAMS like that. "JCL Allocation" of the dataset, then delete/define, then use the JCL Allocation... I don't know what that would do. Oh, maybe, I do now :-)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri May 10, 2013 3:12 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

anyway the whole shebang is a consequence of the poor knowledge of VSAM data management .

if the cluster is defined with the reuse attribute why not simply define it once and after that use ...
Code:
   REPRO INFILE(INDDNM) OUTFILE(OUTDDNM) REUSE
Back to top
View user's profile Send private message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 3:19 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

Sorry this was manual error due to the masking . and i have not givem any duplicate names .. for DATA i have given XYZ.VSAM.FILE.DATA and similarly for INDEX ,
The rro message shows :-
IDC3300I ERROR OPENING XYZ.VSAM.FILE
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri May 10, 2013 3:23 pm    Post subject:
Reply with quote

Code:
IDC3300I ERROR OPENING XYZ.VSAM.FILE


Is the outputfile?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri May 10, 2013 3:24 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

anyway the last suggestion still stands.
Back to top
View user's profile Send private message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 3:27 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

Yes it is the output file(OUTDD)
REPRO INFILE(INDD) OUTFILE(OUTDD) REUSE
IDC3300I ERROR OPENING XYZ.VSAM.FILE
IDC3351I ** VSAM OPEN RETURN CODE IS 168

REUSE also not working :-(
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri May 10, 2013 3:35 pm    Post subject:
Reply with quote

Is the delete and creation of the file successful?

Can you please copy paste the entire output?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri May 10, 2013 3:41 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

using disp=shr for the output file when doing a REPRO
is just a way to incur into lots of trouble...
use DISP=OLD
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri May 10, 2013 4:06 pm    Post subject:
Reply with quote

Quote:
OUTFILE(ddname)| OUTDATASET(entryname)
identifies the target data set. If a VSAM data set defined with a record length greater than 32760 bytes is to be copied to a sequential data set, your REPRO command will end with an error message. Note:
To avoid picking up incorrect volume information from the original DD statement on a data set that has previously been deleted and redefined in this invocation of IDCAMS and the FILE parameter was specified on the delete, you must specify the OUTDATASET keyword instead of OUTFILE. Alternatively, you can issue the REPRO command in a different step from the step that invoked the delete and define commands.OUTFILE(ddname) specifies the name of a DD statement that identifies the target data set. For VSAM data sets, the data set name can name a path. If the DD statement identifies a SYSOUT data set, the attributes must match those specified in JCL DD Statement for a Target Data Set.
Abbreviation: OFILE

OUTDATASET(entryname) specifies the name of the target data set. If OUTDATASET is specified, the entryname is dynamically allocated with a disposition of OLD. For VSAM data sets, entryname can be that of a path.


From the Manuals
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri May 10, 2013 4:07 pm    Post subject:
Reply with quote

A quick review of what you are doing:
1. Delete the old file
2. Define the new file
3. Copy a sequential file into the old file (NOT the new file)

Move the REPRO to a second IDCAMS step of the job.
Back to top
View user's profile Send private message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 4:14 pm    Post subject: Reply to: Repro OUTFILE error
Reply with quote

DISP=OLD also i had tried .. but no luck .. below is the entire error code

DELETE XYZ.VSAM.FILE CLUSTER PURGE
IDC0550I ENTRY (D) XYZ.VSAM.FILE.DATA DELETED
IDC0550I ENTRY (I) XYZ.VSAM.FILE.INDEX DELETED
IDC0550I ENTRY (C) XYZ.VSAM.FILE DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

IF MAXCC <=8 THEN SET MAXCC = 0

DEFINE CLUSTER (NAME(XYZ.VSAM.FILE) -
KEYS(6,0) -
RECORDSIZE(20,20) -
REUSE -
TRACKS(45,15)) -
DATA (NAME(XYZ.VSAM.FILE.DATA) -
FREESPACE(10,15) -
CISZ(8192)) -
INDEX (NAME(XYZ.VSAM.FILE.INDEX))
IDC0508I DATA ALLOCATION STATUS FOR VOLUME D2A465 IS 0
IDC0509I INDEX ALLOCATION STATUS FOR VOLUME D2A465 IS 0
IDC0181I STORAGECLASS USED IS SCFWSTST
IDC0181I MANAGEMENTCLASS USED IS D1VSAM
IDC0181I DATACLASS USED IS DEFAULT
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

REPRO INFILE(INDD) OUTFILE(OUTDD) REUSE
IDC3300I ERROR OPENING
XYZ.VSAM.FILE
IDC3351I ** VSAM OPEN RETURN CODE IS 168
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12

WHERE
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri May 10, 2013 4:19 pm    Post subject:
Reply with quote

Also

Can you try to delete and create the vsam file in one step and Repro in the other step?
Back to top
View user's profile Send private message
Sheerin banu

New User


Joined: 10 Apr 2013
Posts: 10
Location: INDIA

PostPosted: Fri May 10, 2013 4:37 pm    Post subject:
Reply with quote

Hi , when i gave REPRO in differnt step it worked , but cant i use in same step ... ?
I think OUTDATASET worked with same step because it makes a exclusive lock on the DATASET ..
correct me if im wrong.

Also to clarify the file i delete is same as the file i create .
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


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