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

Copying an ESDS VSAM to flat file fails, RC=12, plz advise.


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

Superior Member


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

PostPosted: Wed Mar 14, 2007 3:17 pm
Reply with quote

Hi,

How do we copy an ESDS VSAM file to a DS?

I used the below JCL, ESDS VSAM is HLQ.HLQ1.UDSHIST to be unloaded in Flat file.


//JOBNAME JOB (@),'IDCAMS',
// MSGCLASS=R,CLASS=0,
// NOTIFY=@
//*
//STEP001 EXEC UCC11RMS,PARM=F
//*
//STEP002 EXEC PGM=IDCAMS
//DD1 DD DSN=HLQ.HLQ1.UDSHIST,DISP=SHR
//DD2 DD DSN=HLQ_1.HLQ1_1.UACR40.UDSHIST.FLATFILE,
// DISP=(NEW,CATLG,CATLG),RECFM=FB
//SYSIN DD *
REPRO INFILE(DD1)-
OUTFILE(DD2)-
COUNT(100)
//*
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*


the messages displayed in sysout are:

IDCAMS SYSTEM SERVICES TIME: 00:30:32

REPRO INFILE(DD1)- 00080301
OUTFILE(DD2)- 00080401
COUNT(100) 00080501
IDC3300I ERROR OPENING HLQ.HLQ1.UACR40.UDSHIST.FLATFILE
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


Please advise.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Mar 14, 2007 3:37 pm
Reply with quote

Hey,

Shouldn't u specify the LRECL and Block Size for ur newly creating Flat file???

I don't know whether that is the problem, But give these parameters and try...
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Wed Mar 14, 2007 3:47 pm
Reply with quote

Hi,

You are using
Code:

HLQ_1.HLQ1_1.UACR40.UDSHIST.FLATFILE as a flat file


Kindly make a note that '_' is s special character and that cant be coded in the Dataset name.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Wed Mar 14, 2007 4:07 pm
Reply with quote

Kiran,


Quote:
Kindly make a note that '_' is s special character and that cant be coded in the Dataset name.



Please note if you use special character (other than national character), you will encounter JCL ERROR and not maxcc.


For your refernce, I had tested '_' in DD name. Find the code and the spool message below -

Code:
Code:

  2 //STEP1    EXEC PGM=SORT
  3 //SYSOUT  DD SYSOUT=*
  4 //SYSPRINT DD SYSOUT=*
    //*
    //*
  5 //SORTIN   DD DSN=ISTEST.W.G.PRODSCHM.POL.PREVMNTH,DISP=SHR
  6 //SORTOUT  DD DSN=ISTEST.W.G.PRODSCHM.POL.PR_VMNTH,
    //         DISP=(,CATLG,DELETE),
    //         SPACE=(CYL,(900,100),RLSE),
    //         DCB=*.SORTIN
    //*


JESYSMSG message:

Code:

 STMT NO. MESSAGE
        6 IEFC620I UNIDENTIFIABLE CHARACTER _ ON THE DD STATEMENT



The spool statement is for
Here the condition code is 12. If I remeber correctly, IDCAMS throws 12 as condition code, if the IP file is empty.

Corrections are welcome.

Regards,
Murali
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Mar 14, 2007 4:16 pm
Reply with quote

kgumraj wrote:
Hi,

You are using
Code:

HLQ_1.HLQ1_1.UACR40.UDSHIST.FLATFILE as a flat file


Kindly make a note that '_' is s special character and that cant be coded in the Dataset name.


ooppss..!!
that I used just for representational purpose, I wanted to hide my system HLQ standards.(any one would not like to show..I hope no..!!)..

Please treat them as valid DSN names. There was no JCL error when I submitted the JCL. icon_biggrin.gif
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Mar 14, 2007 4:31 pm
Reply with quote

hello,

I do believe that this happened because u didn't specify the Record Length for ur output file.

U have given RECFM, But the LRECL and BLKSIZE seems to be missing.

Give those parameters and try.. and please get back if it is causing a problem again.. icon_cool.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Mar 14, 2007 6:31 pm
Reply with quote

raak wrote:
hello,

I do believe that this happened because u didn't specify the Record Length for ur output file.

U have given RECFM, But the LRECL and BLKSIZE seems to be missing.

Give those parameters and try.. and please get back if it is causing a problem again.. icon_cool.gif


That's a Copy/ pasting err.I do have coded the parameter Like this

//DD2 DD DSN=HLQ_1.HLQ1_1.UACR40.UDSHIST.FLATFILE,
// DISP=(NEW,CATLG,CATLG),RECFM=FB,LRECL=3000

& let the system decide abt blksize.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Mar 14, 2007 7:43 pm
Reply with quote

First off, read this from the Fine Manual
Quote:
IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN

Explanation: The OPEN/CLOSE/EOV SVC routines detected an error, and an ABEND message has been written to the system output data set.

System Action: The system ends the command.

Application Programmer Response: Check the write-to-programmer (WTP) message written by the OPEN/CLOSE routine. Correct the error. Submit the job again.

System Programmer Response: If the error recurs and the program is not in error, look at the messages in the job log for more information. Search problem reporting data bases for a fix for the problem. If no fix exists, contact the IBM Support Center. Provide the JCL and the SYSOUT output for the job.
Now, follow the recommendations and post the additional information.
Back to top
View user's profile Send private message
h.dinesh

New User


Joined: 06 Dec 2006
Posts: 46
Location: Chennai

PostPosted: Thu Mar 15, 2007 3:46 pm
Reply with quote

anuj_model wrote:

// DISP=(NEW,CATLG,CATLG),RECFM=FB,LRECL=3000

& let the system decide abt blksize.


Try giving RECFM=VB and increasing the LRECL by 4 bytes or refer this link:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt1d405/2.2.4.1?DT=19990106110554#HDRREPROL
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 15, 2007 3:53 pm
Reply with quote

I think that you will find that REPRO will always produce a VB output. I always tend to use BLKSIZE 27998 as well.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Mar 15, 2007 5:22 pm
Reply with quote

Hey Dinesh..!!!

You made my day Buddy..!!

With VB it's working.


Thanks Man.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Mar 15, 2007 5:40 pm
Reply with quote

expat wrote:
I think that you will find that REPRO will always produce a VB output. I always tend to use BLKSIZE 27998 as well.


yeah with VB it's working.

Thanks.
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 Selecting the max value from a file. DFSORT/ICETOOL 3
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
No new posts Change history of vsam file. JCL & VSAM 3
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts EMPTY file check scenario JCL & VSAM 6
Search our Forums:

Back to Top