Monir Khosravi
Monir Khosravi

Reputation: 1

Read all records from the database using call functions in ims

I want to write a batch program with IMS that can get all the records in the database. The structure of my database is as follows: a root segment and a segment below it that has several occurrences and another segment under the second segment that also has several occurrences. How can I do this? So that the least call function is used?

Upvotes: 0

Views: 352

Answers (1)

Bobshift
Bobshift

Reputation: 21

You can use the GN call (Get Next) to traverse through an entire database sequentially. You may issue GN calls until you receive a GB status code back which means essentially means "end of database".

https://www.ibm.com/docs/en/ims/15.1.0?topic=management-gnghn-call

Upvotes: 0

Related Questions