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

Error when copy from VSAM(KSDS) file to PS file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Mon Apr 23, 2007 3:39 pm
Reply with quote

I am trying to copy from VSAM(KSDS) file to PS file. I am getting error message. COuld you please suggest me to correct this problem.

MY JCL:
Code:

//*                                                 
//SYS1    EXEC PGM=IDCAMS,REGION=4096K             
//SYSPRINT DD SYSOUT=*                                 
//GEMS1    DD DSN=EE036.PMM.LONG.DESC,DISP=SHR     
//GEMS6    DD DSN=CV$$.T30716.BJDLDES1,             
//         DISP=(,CATLG,CATLG),                 
//         SPACE=(CYL,(250,10)),UNIT=SYSDA,         
//         DCB=*.GEMS1 
//*                             
//SYSIN DD *                                       
        REPRO -                                     
               INFILE(GEMS1) -                     
               OUTFILE(GEMS6)                       
/*                                                 
//     


ERROR Message:
IDCAMS SYSTEM SERVICES

REPRO -
INFILE(GEMS1) -
OUTFILE(GEMS6)
IDC3300I ERROR OPENING CV$$.T30716.BJDLDES1
IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 3:54 pm
Reply with quote

Don't code any DCB info for the output file, IDCAMS likes to define that itself for REPRO.
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Apr 23, 2007 3:59 pm
Reply with quote

Hi,

Please check the JCL it is trying to copy a PS file to VSAM file.... if so plz chk the file status... if u r not sure about vsam out file.. then delete define vsam file with the new properties.. and try to copy it..
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Apr 23, 2007 4:04 pm
Reply with quote

Expat,

Quote:

Don't code any DCB info for the output file, IDCAMS likes to define that itself for REPRO.


Even without the DCB parameter, I have got the same messages. Please find my step and error messages below -

Code:
//SPLIT  EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IPFILE DD DSN=ISTEST.MURALI.ESDS,DISP=SHR
//OPFILE DD DSN=ISTEST.MURALI.ESDS.FLATFIL1,
//    DISP=(,CATLG,CATLG),
//    SPACE=(CYL,(100,100),RLSE)    DCB=*.IPFILE
//SYSIN DD *
  REPRO INFILE(IPFILE) OUTFILE(OPFILE)
/*


Code:
IDCAMS  SYSTEM SERVICES                                           TIME: 11:29:56

  REPRO INFILE(IPFILE) OUTFILE(OPFILE)                                  00100000
IDC3300I  ERROR OPENING ISTEST.MURALI.ESDS.FLATFIL1
IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 4:05 pm
Reply with quote

Quote:
Please check the JCL it is trying to copy a PS file to VSAM file

The OP has said that the copy is from VSAM to PS, so what makes you think that the copy is going the other way ?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 4:16 pm
Reply with quote

Yeah, sorrry, I was thinking of a different problem.

That's what happens when I get up at 04:00 to fly in to work for the week, the brain malfunctions more than usual.

Try adding RECFM=VB and LRECL=xxxx, where xxxx = length or more of the longest record.
Back to top
View user's profile Send private message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Thu Apr 26, 2007 1:10 pm
Reply with quote

Thank you very much for an information. I will try!!

Suresh
Back to top
View user's profile Send private message
tweety25

New User


Joined: 16 Mar 2007
Posts: 3
Location: India

PostPosted: Thu Apr 26, 2007 2:22 pm
Reply with quote

In the JCL, while creating the PS file you have given DCB=*.GEMS1, and GEMS1 is a VSAM file. Hence you are getting the error.
Define the DCB for the output file
With RECFM, LRECL and BLKSIZE. it should work.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Apr 26, 2007 2:27 pm
Reply with quote

Quote:
With RECFM, LRECL and BLKSIZE. it should work.

For 99.9% of PS dataset allocations, there is no need to specify the BLKSIZE parameter. The operating system will determine the optimum block size based upon the DASD hardware available.
Back to top
View user's profile Send private message
balanim

New User


Joined: 29 Nov 2006
Posts: 6
Location: India

PostPosted: Thu Apr 26, 2007 4:15 pm
Reply with quote

Hello
Quote:
there is no need to specify the BLKSIZE parameter


Yes expat is right no need to mention BLKSIZE system will take care of that.

While giving LRECL you should keep in mind that add 4 bytes more to your the longest record in the file.

For ex: if your longest record in the file is 250 then your LRECL will be
250+4=254, So LRECL=254 and not 250 only.

If at all you want to mention BLKSIZE then again you have add 4 bytes to LRECL so now your BLKSIZE=254+4=258.

Try this definitely it will work.

Regards
Bnim
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
Search our Forums:

Back to Top