View previous topic :: View next topic
|
Author |
Message |
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
Is reading of LDS file possible via COBOL program? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
This is an interesting question. I suspect (but don't know for sure) that the answer may be yes, but not easily. COBOL file operations are record-oriented whereas an LDS has no records -- just bytes. You might be able to treat each 4K CI as a "record" in COBOL and read the data that way, but this is (obviously) not something I've tried so I'm not sure if it would work. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
apparently SAS can: support.sas.com/documentation/cdl/en/vsamref/61644/HTML/default/a003253039.htm
also,
Q What is a LDS ?
A A VSAM data set that contains data but no control information. A linear data set can be accessed as a byte-addressable string in virtual storage.
in the ibm redbook VSAM Demystified REFER to section 1.6.5 Linear data set (LDS)
and pay close attention to Data-in-Virtual.
also, section 1.13.3 zSeries File System (zFS)
but unless you are using z/OS UNIX,
why are you trying to read a VSAM LDS.
if this is a db2 lds, you are wasting everyone's time. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Unix zFS files are defined as LDS as well. -- which is where all my experience with them comes from. Define it, grow the aggregate if needed, and mount it on a mount point is what I've done with them. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
From a web-link:
Quote: |
LDS is a VSAM dataset in name only. It has unstructured 4k (4096 bytes) fixed size CIs which do not contain control fields and therefore from VSAM's standpoint they do not contain any logical records. There is no freespace, and no access from Cobol. Can be accessed by DB2 and IMS fast path datasets. LDS is essentially a table of data maintained on disk. The 'table entries' must be created via a user program and can only be logically accessed via a user program. When passed, the entire LDS must be mapped into storage, then data is accessed via base and displacement type processing. |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Thanks for the data, Anuj -- that's good to know. |
|
Back to top |
|
|
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
I want to check out the contents of DB2 LDS dataset for which I am trying to write a cobol prog. But before I go and write a program I wanted to check the feasibility.
This is just for sake of my curiosity about, how exactly DB2 is storing data into a LDS dataset. I want to see the content and compare the same with actual data.
If somebody from you all, can readily help me explaining the methodology DB2 follow in storing data into LDS then you are most welcome !! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you create a very small tablespace and dump this. Then load only a few rows into this. Then dump the data and review the output (using that very old utility IEBeyeball ).
I would discontinue the COBOL approach as i believe the effort invested will not be worth the result.
Keep in mind that the way the internals work can be changed without notice at any time. |
|
Back to top |
|
|
|