View previous topic :: View next topic |
Author |
Message |
s000p Beginner
Joined: 22 Jun 2005 Posts: 12 Topics: 5
|
Posted: Wed Jun 22, 2005 2:00 am Post subject: Info on RSA used to access a GSAM file ???? |
|
|
In IMS one can access a GSAM file by passing a RSA to DLI call like
Call "CBLTDLI" Using DLI-GU
IO-PCB
INPUT-AREA-GSAM
RSA.
This RSA can also be passed at a GN call. RSA consist of following structure.
01 RSA
02 RSA-BLOCK 9(9) COMP.
02 RSA-VOL-SEQ 9(5) COMP.
02 RSA-RECORD 9(5) COMP.
I have tried to access the GSAM file through this RSA but found that the value of this RSA is not changing at each record, a constant value is coming up at each run for every record.
Now my query is
What exactly is RSA? Why should we use RSA? It would be better if some one can give an example where RSA has to be used? When RSA is not changing its value Why should we use an RSA? (one possibility is to use it at a restart with GU call to GSAM, but when RSA is not changing its value how can one know which particular value to be supplied for RSA).
Can some one guide me on this.
Thanks,
Sp |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jun 22, 2005 4:36 am Post subject: |
|
|
s000p,
Please post your question only once and in only one forum. When you post the same question in multiple forums, you can cause confusion and frustration for the people that are attempting to help you. I have deleted your duplicate post.
The RSA (record search argument) is an 8-byte token that can be returned on GN and ISRT calls. The application program can save the RSA for use in a subsequent GU call. You can retrieve records directly from a GSAM database, but you must supply the record's address. To do this, use a record search argument (RSA). An RSA is similar to an SSA, but it contains the exact address of the record that you want to retrieve. The specific contents and format of the RSA depend on the access method GSAM is using.
I would suggest that you read this topic in the below link for a better understanding of GSAM database processing.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSP30F3/1.10?DT=20020906093406
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
s000p Beginner
Joined: 22 Jun 2005 Posts: 12 Topics: 5
|
Posted: Wed Jun 22, 2005 7:45 am Post subject: Info on RSA used to access a GSAM file ???? |
|
|
First I apologize on putting the query on to two forums. first I had put it on the programming group but later realized that it should be put onto IMS group.
Thanks for the link. actually I m bit confused here and appreciate if you can again help me out. I tried a program and displayed the RSA after every GN call and what I noticed is that there is no change in the value of the RSA afer each GN call. When RSA is storing the address of a record this value should vary for each record so that when passed at a GU call it makes a search criteria.
What exactly happened with processing with a RSA? Where the exact address of a record is stored after a GN call and why RSA is not changing its value after each GN call??
Thanks,
sp |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jun 22, 2005 9:05 am Post subject: |
|
|
Quote: |
I tried a program and displayed the RSA after every GN call and what I noticed is that there is no change in the value of the RSA afer each GN call. When RSA is storing the address of a record this value should vary for each record so that when passed at a GU call it makes a search criteria.
|
S000p,
What exactly are you displaying as RSA ? In your first post you defined RSA as 12 bytes which is wrong. RSA is only 8 bytes. The specific contents and format of the RSA depend on the access method GSAM is using. For BSAM tape data sets and VSAM data sets, the RSA contains the relative byte address (RBA). For BSAM disk data sets, the RSA contains the disk address in the TTR (track, track, record) format.
so change your definition of RSA as follows
Code: |
01 RSA.
02 RSA-BLOCK PIC S9(9) COMP.
02 RSA-VOL-SEQ PIC S9(4) COMP.
02 RSA-RECORD PIC S9(4) COMP.
|
and your call should be
Code: |
Call "CBLTDLI" Using DLI-GU
IO-PCB
INPUT-AREA-GSAM
RSA.
|
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
s000p Beginner
Joined: 22 Jun 2005 Posts: 12 Topics: 5
|
Posted: Thu Jun 23, 2005 1:51 am Post subject: |
|
|
Thanks Kolusu,
That was my mistake, I had taken RSA as 12 bytes. Now I am getting it, but I have a query here again
RSA has three parts in it, Block, Volume and Record. Block and Vol are constant for a file while RSA-RECORD is changing as per the relative byte number from where a record starts e.g I have a VB file and if each record is of 6 bytes then physically each bytes is taking up 10 bytes (4 extra for being a VB) and RSA are appearing like following
0004, 0014, 0024
Now since it is a 4 byte long field, so it can be repetitive or dulplicate for two records and if restart the program it is picking up only the first occurence of the specified RSA record. e.g. I increased my record size to 500 and RSA displayed are like
0004 for record#1
0504 for record#2
1004 for record#3
.
.
.
.
9504 for record#20
and for record#21 it is again 0004
for record#22 it is 0504
and again increases ...
Now I put an Abend in the program after reading 40 records and restarted the program by supplying RSA through the SYSIN card as 0504 (providing the values for Block and Vol).
There were two records whose RSA was 0504, Record#2 and record#22
When the program restarted it picked the record#2 and not the record#22, i.e. picked first occurence only.
Now my query how I can pick the record#22 after the restart?
Thanks,
sp |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jun 23, 2005 6:05 am Post subject: |
|
|
s000p,
I am not sure as to how you broke the RSA as three parts of Block, Volume and Record as for BSAM disk data sets, the RSA contains the disk address in the TTR (track, track, record) format.
So just define the RSA as PIC S9(10) Comp which is 8 bytes and see if it works.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
s000p Beginner
Joined: 22 Jun 2005 Posts: 12 Topics: 5
|
Posted: Thu Jun 23, 2005 8:11 am Post subject: |
|
|
Hi Kolusu,
Actually I had seen this structure of RSA at our system. I tired with 9(10) COMP and 9(17) COMP. Yes value is changing for each record. May be the interpretation is different at different installations ( in terms of track track and record OR Block, Volume and record) but it works same everywhere.
Since it is stored in binary form so I converted back the value in decimal retrieved by making the RSA as 9(10) COMP to binary stream of 64 bits and again broken it up to 3 parts of 32 bits, 16 bits and 16 bits and then converted them back to decimal so that they are mapped to 9(9) comp, 9(4) comp, 9(4) comp values. These two values are same.
Thanks for your help on this topic.
If would be more learning for me if you can share few of the occassions where you have found RSA to be almost necessary to solve a problem.
Once again thanks,
sp |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jun 23, 2005 8:20 am Post subject: |
|
|
S000p,
Till date We never had to use RSA. Actually I really don't see the need also. With IMS Checkpoint restart facility and its ability to reposition GSAM databases itself to the last committed record, I don't see any need for RSA. IMHO I feel that the programmer might make a mistake when dealing with RSA's.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
s000p Beginner
Joined: 22 Jun 2005 Posts: 12 Topics: 5
|
Posted: Fri Jun 24, 2005 3:41 am Post subject: |
|
|
Hi Kolusu,
On this RSA problem, I have observed that RSA act as a search parameter only for a GU call and not for a GN call. Is that so??
I am putting checkpoint after every 10 records and abend the program forcefully after every 16 records. Now at restart I supplied the RSA corresponding to record number 14 and put a GN call at restart so that the first record to be read is record number 15 but system has read record number 11 ie the next record after the last checkpoint. But when I replaced this GN with GU it has read record number 14.
So Is it that at a GN call RSA get overwritten??
Thanks,
sp |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|