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
 

 

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

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

Senior Member


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

PostPosted: Wed Mar 14, 2007 3:17 pm    Post subject: Copying an ESDS VSAM to flat file fails, RC=12, plz advise.
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    Post subject:
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    Post subject: Re: Copying an ESDS VSAM to flat file fails, RC=12, plz advi
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: 1439
Location: Bangalore,India

PostPosted: Wed Mar 14, 2007 4:07 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Mar 14, 2007 4:16 pm    Post subject: Re: Copying an ESDS VSAM to flat file fails, RC=12, plz advi
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    Post subject:
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

Senior Member


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

PostPosted: Wed Mar 14, 2007 6:31 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Mar 14, 2007 7:43 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 15, 2007 3:53 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Mar 15, 2007 5:22 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Mar 15, 2007 5:40 pm    Post subject:
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    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 Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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