MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

To find record length of a PS file.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Thu Dec 08, 2005 5:43 pm    Post subject: To find record length of a PS file. Reply with quote

Hi,

Is there a way in which to a program ( either COBOL or PL/I ) i can find the record length of a physical sequential file ?

Thanks in advace,
Karun.
Back to top
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Dec 09, 2005 4:03 am    Post subject: Reply with quote

Karunkallore,

Are you trying to read the LRECL of a PS from inside a high level program like COBOL / PLI ???

If so, you can do that by jumping thro' Control blocks (TCB - JFCB - DCB...). You need to allocate your PS to any DD Name and use that DD Name ot search DCB.

Check out the following links.
http://mvsforums.com/helpboards/viewtopic.php?t=1703&highlight=cobol+tiot
http://mvsforums.com/helpboards/viewtopic.php?t=1657&highlight=cobol+tiot

But may we know what is that you are trying to accomplish after getting the LRECL ?

Thanks,
Phantom
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Dec 09, 2005 7:54 am    Post subject: Reply with quote

Also, the JFCB will only reflect the dcb information after the data set is opened.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Dec 09, 2005 8:18 am    Post subject: Reply with quote

Karunkallore,

As Semigeezer said the DCB will be loaded only when the dataset is opened. So, if you are trying to dynamically allocate some datasets through COBOL and read them them - then this is not the right method. B'cas u need to declare the FD section with the exact LRECL of your file. You can't vary this info. dynamically during run time.

Thanks,
Phantom
Back to top
View user's profile Send private message
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Dec 09, 2005 11:37 am    Post subject: For report Generation. Reply with quote

Hi Phantom/Semigeezer,

Thank you very much for the insight. Yes i a looking forward to read the LRECL of a PS file from a COBOL program. This file is already catalogued and is not allocated dynamically in the code.

This information is required as an input to another set of applications ( in my shop ) to generate reports.

I will go through the referece links given and work on it.

Thank you once again for the help !!!

MVSFORUMS rocks !!!!! Smile

Karun.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group