Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Batch OLQ

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO
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    Post subject: Batch OLQ
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

Site Director


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

PostPosted: Thu Feb 11, 2010 10:58 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Feb 12, 2010 2:51 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us