View previous topic :: View next topic
|
Author |
Message |
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
Hi,
I am getting 'LENGTH INVALID' error while copying a KSDS file to a flat file.
KSDS file has average and maximum length as 20 and I have given the same for PS file. The key in KSDS file is of length 11.
What can be the possible solutions to resolve this? |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Can you please post the JCL that you are using? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Post your JCL and the output and someone might be able to tell you. |
|
Back to top |
|
|
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
//IDCAMS01 EXEC PGM=IDCAMS
//KSDSFILE DD DSN=AAA.BBB.KSDS,
// DISP=SHR
//BSAMFILE DD DSN=CCC.DDD.BSAM,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(200,(100,100)),AVGREC=K,
// RECFM=FB,LRECL=20
//SYSIN DD *
REPRO INFILE(KSDSFILE) -
OUTFILE(BSAMFILE)
/*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=Z |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
What can be the possible solutions to resolve this?
|
insure that the dcb parms for the destination file are accurate.
if you want help, please provide- dcb parms for both files
- JCL used for the copy
- listcat of ksds file
|
|
Back to top |
|
|
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
Listcat of KSDS file:
Code: |
CLUSTER ------- SCZT.PRISPLN.MAST.KSDS
IN-CAT --- CATALOG.HBC.TEST01
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.138
RELEASE----------------2 EXPIRATION------0000.000
SMSDATA
STORAGECLASS -------TEST MANAGEMENTCLASS-STANDARD
DATACLASS ------STANDARD LBACKUP ---0000.000.0000
BWO STATUS------00000000 BWO TIMESTAMP---00000 00:00:00.0
BWO---------------(NULL)
RLSDATA
LOG ----------------(NULL) RECOVERY REQUIRED --(NO) FRLOG --------
----(NULL)
VSAM QUIESCED -------(NO) RLS IN USE ---------(NO)
LOGSTREAMID-----------------------------(NULL)
RECOVERY TIMESTAMP LOCAL-----X'0000000000000000'
RECOVERY TIMESTAMP GMT-------X'0000000000000000'
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
DATA-----SCZT.PRISPLN.MAST.KSDS.DATA
INDEX----SCZT.PRISPLN.MAST.KSDS.INDEX
DATA ------- SCZT.PRISPLN.MAST.KSDS.DATA
IN-CAT --- CATALOG.HBC.TEST01
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.138
RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--SCZT.PRISPLN.MAST.KSDS
ATTRIBUTES
KEYLEN----------------11 AVGLRECL--------------20 BUFSPACE------
-----50000 CISIZE-------------18432
RKP--------------------0 MAXLRECL--------------20 EXCPEXIT------
----(NULL) CI/CA-----------------45
SHROPTNS(2,3) SPEED UNIQUE NOERASE INDEXED
NOWRITECHK NOIMBED NOREPLICAT
UNORDERED REUSE NONSPANNED
STATISTICS
REC-TOTAL---------475325 SPLITS-CI--------------0 EXCPS---------
------4638
REC-DELETED---------2012 SPLITS-CA--------------0 EXTENTS-------
---------1
REC-INSERTED-----------1 FREESPACE-%CI---------25 SYSTEM-TIMESTA
MP:
REC-UPDATED------------0 FREESPACE-%CA---------25 X'C433E40
1AE740F80'
REC-RETRIEVED----2860245 FREESPC----------5769216
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA--------16588800
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2009.138
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--SCZT.PRISPLN.MAST.KSDS
ATTRIBUTES
KEYLEN----------------11 AVGLRECL---------------0 BUFSPACE------
---------0 CISIZE---------------512
RKP--------------------0 MAXLRECL-------------505 EXCPEXIT------
----(NULL) CI/CA-----------------49
SHROPTNS(2,3) RECOVERY UNIQUE NOERASE NOWRITECHK
NOIMBED NOREPLICAT UNORDERED
REUSE
STATISTICS
REC-TOTAL-------------19 SPLITS-CI--------------0 EXCPS---------
-------226 INDEX:
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS-------
---------1 LEVELS-----------------2
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTA
MP: ENTRIES/SECT-----------6
REC-UPDATED------------1 FREESPACE-%CA----------0 X'C433E40
1AE740F80' SEQ-SET-RBA------------0
|
|
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
The problem might be with the DCB parameters.
Does your JCL output give 'INVALID LENGTH I/O' error?
Can you please post the JCL messages? |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I have always used RECFM=VB LRECL=maxlrecl+4 for the output in the past with no problems.
Also consider using your SORT product for larger datasets. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
expat wrote: |
Also consider using your SORT product for larger datasets. |
Thanks for that comment. Now I don't feel so dumb. I originally posted a request for the OP to show the contents of their SORT SYSOUT DD, since I always assume that everyone uses SORT for this type of activity. Silly me. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Once it happened to me for ESDS then changing RECFM=VB from RECFM=FB was the solution. |
|
Back to top |
|
|
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
The error message is like this:
IDCAMS SYSTEM SERVICES
REPRO INFILE(KSDSFILE) -
OUTFILE(BSAMFILE)
IDC3302I ACTION ERROR ON SCZT.PRISPLN.MAST.BSAM.BKUP8
IDC3309I ** RECORD X'C8F0F1F0F0' NOT WRITTEN. LENGTH INVALID
IDC3302I ACTION ERROR ON SCZT.PRISPLN.MAST.BSAM.BKUP8
IDC3309I ** RECORD X'C8F0F1F1F0' NOT WRITTEN. LENGTH INVALID
IDC3302I ACTION ERROR ON SCZT.PRISPLN.MAST.BSAM.BKUP8
IDC3309I ** RECORD X'C8F0F1F1F1' NOT WRITTEN. LENGTH INVALID
IDC3302I ACTION ERROR ON SCZT.PRISPLN.MAST.BSAM.BKUP8
IDC3309I ** RECORD X'C8F0F1F1F2' NOT WRITTEN. LENGTH INVALID
IDC31467I MAXIMUM ERROR LIMIT REACHED.
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12 |
|
Back to top |
|
|
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
I tried solution given by "Expat" but it didn't worked. Still the same error. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
IDC3309I
** RECORD xxx NOT WRITTEN. LENGTH INVALID.
Explanation:
The specified record was not written for one of the following reasons:
* The record length was greater than the LRECL of the output data set (logical processing).
* The record length was less than the LRECL of the output data set and output RECFM=FIXED, or output is a relative record data set.
* The control-interval length to be written did not equal the control interval size for the output data set.
* The record length was less than the minimum output LRECL allowed (input LRECL + 4) when RECFM=F and output is to a subsystem device.
In the message text:
xxx
The first five bytes of the record in hexadecimal format.
System action:
The system continues processing until four such errors occur, in which case no more records are written to the data set.
Application Programmer Response:
Redefine the output data set with the correct LRECL or control interval size.
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.
Source:
DFSMSdfp
Detecting Module:
IDCIO01 |
The error message indicates you've got a conflict between the record lengths in the KSDS file and the sequential file you're trying to define -- not the defined record length for the KSDS, but the actual record lengths. Since the JCL you posted does not match the data set name in the error messages, there's not much more we can say. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
NandanPhalak wrote: |
I tried solution given by "Expat" but it didn't worked. Still the same error. |
I have corrected my previous post, changing FB to VB
Apologies for the typo. Please rety with VB |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Expat,
Ummm. . . Ahhhh. . . .
Quote: |
Apologies for the typo. Please rety with VB |
It wasn't your typo. . . I mis-read. . . and changed your original VB to FB believing that was a typo. . . .
I'll go quietly now. . .
d |
|
Back to top |
|
|
|