IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Batch OLQ


IBM Mainframe Forums -> IDMS/ADSO
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Thu Feb 11, 2010 10:46 pm
Reply with quote

I need to find out disconnected records within an optional set relationship using OLQ in Batch.
Let me elaborate using the following example:
Say there are 3 IDMS records, A, B and C. B has 2 owners A and C. Set relationships are A-B (mandatory) and B-C (Optional).

The requirement is to obtain the following fields:
All fields of record B.
Fields from record A (for corresponding Owner in A-B): A1, A2
Fields from record C (for corresponding Owner in B-C): C1, C2 or Blanks (in case set is disconnected)

If we write the following query on OLQ batch:
Select a.A1, a.A2, c.C1, c.C2, b.* -
FROM A a, C c, B b -
WHERE (A-B.A.B) -
AND (B-C.B.C)

The query will fetch ONLY those rows from record B that are connected to both records A and C. But since the set B-C is optional there may be rows in record B that are disconnected. These rows will not appear in the output.
If B has 100 rows, all of these will be connected to A. But say only 80 are connected to C. So the above query will fetch only 80 rows and drop the rest 20 rows. The requirement is to have all 100 rows (80 + 20) rows to appear in the output with Values in C1 and C2 for connected records (B-C) and blank values in C1 and C2 for dis-connected records .

I am aware that this can be achieved by using a COBOL-IDMS routine, but I need this through OLQ Batch query only. If anyone can share the query to achieve this please respond.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Feb 11, 2010 10:58 pm
Reply with quote

Hello and welcome to the forum,

Quote:
I am aware that this can be achieved by using a COBOL-IDMS routine, but I need this through OLQ Batch query only.
If this is needed quickly, suggest you write the code.

There may or may not be a "solution" posted, but if someone wants this information soon, i's suggest having the code ready in case no query is posted soon enough. . .
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Thu Feb 11, 2010 11:40 pm
Reply with quote

Since I needed it quickly I have already coded a program but I need the solution through OLQ since this is simple and quick. Also I am working on apilot as of now. The next application has several such instances. So even if the solution comes across slightly late it won't be a problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Feb 12, 2010 2:51 am
Reply with quote

Hello,

You might also open an issue with CA Support. . . I don't "do" idms, but they have been most helpful with many other products. . .

Good Luck!
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 -> IDMS/ADSO

 


Similar Topics
Topic Forum Replies
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Batch install term/printer CICS 2
No new posts File Aid Batch IBM Tools 7
Search our Forums:

Back to Top