View previous topic :: View next topic
|
Author |
Message |
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi all,
I was unable to give input to a file having record length of 120,
when i am trying to open it using 3.4 option in ispf it is showing like
'Invalid record length'
can anybody give solution to this.
i have tried using COBOL program also while opening itself file status of 90 is coming and i was unable to write into it. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
In 3.4, enter I (for data set information) and post what you see in the General Data section of the screen. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
hi scherrer,
below i am giving you the dataset infirmation:
Code: |
General Data Current Allocation
Management class . . : MCTEST Allocated cylinders : 1
Storage class . . . : SCTEST Allocated extents . : 1
Volume serial . . . : E20105
Device type . . . . : 3390
Data class . . . . . : **None** Current Utilization
Organization . . . : PS Used cylinders . . : 1
Record format . . . : FB Used extents . . . : 1
Record length . . . : 120
Block size . . . . : 1200
1st extent cylinders: 1
Secondary cylinders : 25
Data set name type : SMS Compressible : NO
Creation date . . . : 2007/08/03 Referenced date . . : 2007/08/03
Expiration date . . : ***None***
|
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Is it an empty file?
How is the file defined in the Input-Output Section.
What command in your program did you use to OPEN the file?
What type/version of COBOL are you using? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
It sounds ike you have a cataloged dataset that has only been allocated (i.e. with IEFBR14) and not opened as output. The left-over data at that location on the dasd does not match the attributes defined for the file, so you get the error.
Do you know if the dataset was SMS-created? My guess is that it was not.
Delete the dataset, and re-create it by opening it as output either in a program or with some utility. You shold then not see this error. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
hi,
i have created that dataset with the following jcl,
Code: |
//step1 exec pgm=iefbr14
//dd1 dd dsn=test.bala.infile1,disp=new,catlg,delete),
// dcb=(lrecl=120,recfm=f,blksize=1200,dsorg=ps),
// unit=sysda,space=(cyl,(10,15))
//
|
the dataset is created successfully, but the problem is when i am trying to edit in 3.4 option to give input, it is saying 'invalid record length' |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
since you are using 3.4 to edit the file. delete it, and reallocate the file in 3.2, then go to 3.4 and see if it works. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
use tracks instead of cylinders. 15, trks with 30 for extent will give you 33 cyl total before you e27.
Cylinders is a large allocation and eats up dasd. use tracks, 1 less problem for your sys-prog's/data management people to bug you about. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Yes
Quote: |
i have created that dataset with the following jcl,
|
that is your problem. You allocated the space, but put no data in the file. If you use 3.2 online or use IEBGENER or SORT in batch to create an EOF, you should not have the problem. |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
I tried your JCL and ran a JCL check on it and got the following message:
Code: |
//DD1 DD DSN=MV603.BALA.INFILE1,DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=120,RECFM=F,BLKSIZE=1200,DSORG=PS),
// UNIT=SYSDA,SPACE=(CYL,(10,15))
CAY6086E BLKSIZE INCONSISTENT WITH LRECL FOR DATA SET WITH FIXED RECORDS
|
And when I executed it, I got a 00 return code, but alas! cannot open the dataset because of an invalid record length!
Now if I change the RECFM to FB (fixed block), the error is solved.
Aother option is to change your BLKSIZE to 0 (allowing the system to establish the block size). Again, the error is solved. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Good catch |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
It took a little more research, but I finally came to the root of the problem.
Let's look at your DCB (the source of the problem).
DSORG=PS - defines the dataset as physical sequential - no problem here.
RECFM=F - this says that your file's records are fixed length unblocked!!!!! - setting this to F confuses the BLKSIZE parameter and ANY value in BLKSIZE other than zero results in a corrupted dataset that cannot be used!
To correctly use the BLKSIZE parameter, the RECFM has to be FB, VB or VBS.
I knew there had to be a better explanation than what I previously offered! |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi all,
I am very thankful to you all for your valuable suggestions,
the error is with the record format only as you all suggested, I have changed it and ran the jcl now, I am able to give input now . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome.
Thank you for posting that your process now works |
|
Back to top |
|
|
|