View previous topic :: View next topic
|
Author |
Message |
PrasadV
New User
Joined: 21 Mar 2004 Posts: 8 Location: Chennai
|
|
|
|
Hi Guys,
i have the following segments with the field declarations.
Customer
cno char Primary Key
cname
cdep
cadds
cphone
Dept
ddep Primary Key
ddname
How shall i retrive records for the following query.
List all employees working in 'Sales' department.
Pls. do give the answer(Query) to the problem in IMS DB.
Thanx. in Adv.
V. Prasad.[/b] |
|
Back to top |
|
|
G.P.Naidu
New User
Joined: 28 Apr 2004 Posts: 4 Location: delhi
|
|
|
|
Hi,
HERE I AM GIVING COBOL IMS DB CODE FOR UR REQUIREMENT.
Code: |
1000-PARA.
CALL 'CBLTDLI' USING GN-FUNCTION
CUST-PCB-MASK
CUST-IO-AREA
UNQUAL-CUST-SSA
IF CUST-STATUS = 'GB' | CUST-STATUS = 'GE'
MOVE 'Y' TO END-OF-DATABASE
PERFORM 100-END-OF-PARA
ELSE
IF CUST-STATUS = ' '
PERFORM 101-WRITE-PARA
END-IF.
1000-PARA-EXIT.
EXIT.
101-WRITE-PARA.
IF CDEP = 'SALES'
WRITE SALE-FILE-REC.
END-IF.
101-WRITE-PARA-EXIT.
EXIT.
PERFORM 1000-PARA UNTIL END-OF-DATABASE. |
Regards,
G.P.Naidu |
|
Back to top |
|
|
muthuraamn
New User
Joined: 26 Nov 2003 Posts: 7 Location: chennai
|
|
|
|
Hi,
In IMS We need to write call statements to database with SSA's if required.
Regards,
Muthu |
|
Back to top |
|
|
|