IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

How to read the content of RRDS and export them?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Duola32

New User


Joined: 17 Apr 2015
Posts: 2
Location: CHINA

PostPosted: Sat Apr 18, 2015 1:22 pm
Reply with quote

How to read the content of RRDS and export them?
I want to develop a assembler program to export the RRDS content into a PDS.
However, I am totally lost about how to do this.
Is there anybody who can help me on this?


Is there any programming manual in assembler for reading the RRDS content?
Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10697
Location: italy

PostPosted: Sat Apr 18, 2015 1:24 pm
Reply with quote

why reinvent the wheel, and not use a simple IDCAMS REPRO ???
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 865
Location: The Universe

PostPosted: Sat Apr 18, 2015 3:06 pm
Reply with quote

Mr. Sorichetti is correct. Of course, what do you mean by "export?" In VSAM, when you "export" a data set, its contents are placed into a regular sequential data set following coded information about the data set that permits the IDCAMS utility to reallocate the data set with the same attributes when you "import" the data set.

Reading an RRDS data set sequentially should be no harder than reading any other VSAM data set sequentially. See "DFSMS Using Data Sets" and "DFSMS Macro Instructions for Data Sets" for your z/OS release.

If those manuals are completely mystifying to you, I am sure there are consultants that monitor this forum that would be happy to assist you in exchange for appropriate compensation.
Back to top
View user's profile Send private message
Duola32

New User


Joined: 17 Apr 2015
Posts: 2
Location: CHINA

PostPosted: Sat Apr 18, 2015 4:45 pm
Reply with quote

Thanks you for the reply.

The reason for not using REPRO is that I need to read records from RRDS in which RMF writes RMF III monitoring data and then sort the records into a PDS.In the end, I will load the records into DB2 table using the PDS which stored the RMF III data.

I have tried to use REPRO and the output dataset's records is not available for DB2 utility to load them into DB.

This assembler not only need to read and store RRDS records into PDS but also need to sort the reocrd as the following format(structured data):
AD3100 10 .5 1982-01-01 1982-07-01
AD3110 10 1.0 1982-01-01 1983-01-01
AD3111 60 .5 1982-03-15 1982-04-15
AD3111 60 .80 1982-01-01 1982-04-15
AD3111 70 .5 1982-03-15 1982-10-15
AD3111 70 1.5 1982-02-15 1982-10-15
AD3111 80 1.0 1982-09-15 1983-01-01
AD3111 80 1.25 1982-04-15 1983-01-15
AD3111 180 1.0 1982-10-15 1983-01-15
AD3112 60 .5 1982-02-01 1982-03-15
AD3112 60 .75 1982-01-01 1982-03-15
AD3112 60 .75 1982-12-01 1983-01-01
AD3112 60 1.0 1983-01-01 1983-02-01
AD3112 70 .25 1982-08-15 1982-10-15
AD3112 70 .5 1982-02-01 1982-03-15
AD3112 70 .75 1982-01-01 1982-10-15

I am learning HLASM myself and I can code assembler program to make the input data as structured data as I need.
However, I am totally lost about how to read the record from RRDS(VSAM)
and save those record into PDS dataset.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10697
Location: italy

PostPosted: Sat Apr 18, 2015 5:35 pm
Reply with quote

if You need formatting then use Your sort product!
people are adamant in providing solution for which there is an alternative
based on utilities and installed products

furthermore nothing prevents from reading sequentially an RRDS using cobol or pl/i

google for cobol vsam rrds sequential read
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Need to read duplicate rows from tabl... DB2 3
No new posts Read 4MB message and split into multi... COBOL Programming 9
No new posts how to read accounting information in... COBOL Programming 1
No new posts Dynamically read input files using BP... COBOL Programming 20
No new posts EIBRESP=16 and EIBRESP2=25 while doi... CICS 2

Back to Top