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
 

 

How to give input to file having record length 120

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Fri Aug 03, 2007 7:37 pm    Post subject: How to give input to file having record length 120
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Aug 03, 2007 8:02 pm    Post subject:
Reply with quote

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
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Fri Aug 03, 2007 8:15 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Aug 03, 2007 8:41 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Aug 03, 2007 8:47 pm    Post subject:
Reply with quote

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
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Fri Aug 03, 2007 8:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Aug 03, 2007 9:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Aug 03, 2007 9:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Aug 03, 2007 9:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 147
Location: Columbia, MO

PostPosted: Fri Aug 03, 2007 9:10 pm    Post subject: Re: How to give input to file having record length 120
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Aug 03, 2007 9:12 pm    Post subject:
Reply with quote

Good catch icon_smile.gif
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 147
Location: Columbia, MO

PostPosted: Fri Aug 03, 2007 9:58 pm    Post subject: Re: How to give input to file having record length 120
Reply with quote

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
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Mon Aug 06, 2007 12:05 pm    Post subject:
Reply with quote

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 icon_biggrin.gif .
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 06, 2007 6:12 pm    Post subject:
Reply with quote

You're welcome.

Thank you for posting that your process now works icon_smile.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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