Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Reading a LDS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Thu Oct 21, 2010 2:10 pm    Post subject: Reading a LDS file
Reply with quote

Is reading of LDS file possible via COBOL program?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Thu Oct 21, 2010 4:53 pm    Post subject:
Reply with quote

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

Global Moderator


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

PostPosted: Thu Oct 21, 2010 5:44 pm    Post subject:
Reply with quote

apparently SAS can: http://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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Thu Oct 21, 2010 6:04 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 27 Oct 2009
Posts: 2441
Location: Netherlands, Amstelveen

PostPosted: Thu Oct 21, 2010 6:46 pm    Post subject:
Reply with quote

The DIV macro can be used to access a LDS.

http://publibfp.dhe.ibm.com/epubs/pdf/iea2a630.pdf

MVS Programming: Assembler Services Guide
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 21, 2010 8:27 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Thu Oct 21, 2010 8:36 pm    Post subject:
Reply with quote

Thanks for the data, Anuj -- that's good to know.
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Fri Oct 22, 2010 8:51 am    Post subject:
Reply with quote

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

Site Director


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

PostPosted: Fri Oct 22, 2010 9:27 am    Post subject:
Reply with quote

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 icon_smile.gif ).

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 0 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us