Skip to main content

I would like to check the possibility to implement a trigger behavior using COBOL NetExpress 5.1 for C-ISAM files.

 

There is a set of Legacy COBOL programs that opens lots of BOOKS and C-ISAM files (IDX3) and I am trying to do a non intrusive approach to update data on my database when the C-ISAM file is altered (by update or insert).  If something like that could be done I would not need to change all the codes of my legacy.

 

I am not closed in this approach.  
I am open to suggestions.


#netexpress
#c-isam
#NetExpress5.1
#Linux
#trigger

I would like to check the possibility to implement a trigger behavior using COBOL NetExpress 5.1 for C-ISAM files.

 

There is a set of Legacy COBOL programs that opens lots of BOOKS and C-ISAM files (IDX3) and I am trying to do a non intrusive approach to update data on my database when the C-ISAM file is altered (by update or insert).  If something like that could be done I would not need to change all the codes of my legacy.

 

I am not closed in this approach.  
I am open to suggestions.


#netexpress
#c-isam
#NetExpress5.1
#Linux
#trigger
For my idea work, your system needs to be in OO.
My idea is to create a class to manage the C-ISAM file, and to instantiate it you pass who is invoking it.
Something like:

Invoke cisamclasse "new" Using SELF
                     Returnin mycisamfile

In "cisamclasse", before the update or write you invoke

Invoke anInvoker "BeforeUppadte"

or

Invoke anInvoker "AffterUppadte"


______
/ajSauro\\
| `------------------------.
| /"""\\ Antonio João |
| ( o o ) ajsauro@gmail.com |
| \\(_)/ Primavera do Leste |
| \\-/ Mato Grosso |
| /V\\ Brasil |
| Pagode, nem morto! |
`----------------------------------´

I would like to check the possibility to implement a trigger behavior using COBOL NetExpress 5.1 for C-ISAM files.

 

There is a set of Legacy COBOL programs that opens lots of BOOKS and C-ISAM files (IDX3) and I am trying to do a non intrusive approach to update data on my database when the C-ISAM file is altered (by update or insert).  If something like that could be done I would not need to change all the codes of my legacy.

 

I am not closed in this approach.  
I am open to suggestions.


#netexpress
#c-isam
#NetExpress5.1
#Linux
#trigger
You should be able to create a trap for all file operations using the compiler directive CALLFH
>>-.---.--.------CALLFH--"handler-name"--.--><
-/- ------CALLFH------------------

Parameters:
handler-name Root-name of a program to be called to act as the file handler. One of:
EXTFH The file handler supplied with this COBOL system
FHREDIR For use with Fileshare Version 2
fhname Name of your own file handler

your own file handler would just have to trap the calls to extfh and then call the appropriate file handler and if successful then do the database update/insert if needed.

You could write your module in either C or COBOL - refer to definition of the filehandler interface

I would like to check the possibility to implement a trigger behavior using COBOL NetExpress 5.1 for C-ISAM files.

 

There is a set of Legacy COBOL programs that opens lots of BOOKS and C-ISAM files (IDX3) and I am trying to do a non intrusive approach to update data on my database when the C-ISAM file is altered (by update or insert).  If something like that could be done I would not need to change all the codes of my legacy.

 

I am not closed in this approach.  
I am open to suggestions.


#netexpress
#c-isam
#NetExpress5.1
#Linux
#trigger
You should be able to create a trap for all file operations using the compiler directive CALLFH
>>-.---.--.------CALLFH--"handler-name"--.--><
-/- ------CALLFH------------------

Parameters:
handler-name Root-name of a program to be called to act as the file handler. One of:
EXTFH The file handler supplied with this COBOL system
FHREDIR For use with Fileshare Version 2
fhname Name of your own file handler

your own file handler would just have to trap the calls to extfh and then call the appropriate file handler and if successful then do the database update/insert if needed.

You could write your module in either C or COBOL - refer to definition of the filehandler interface

I would like to check the possibility to implement a trigger behavior using COBOL NetExpress 5.1 for C-ISAM files.

 

There is a set of Legacy COBOL programs that opens lots of BOOKS and C-ISAM files (IDX3) and I am trying to do a non intrusive approach to update data on my database when the C-ISAM file is altered (by update or insert).  If something like that could be done I would not need to change all the codes of my legacy.

 

I am not closed in this approach.  
I am open to suggestions.


#netexpress
#c-isam
#NetExpress5.1
#Linux
#trigger
You should be able to create a trap for all file operations using the compiler directive CALLFH
>>-.---.--.------CALLFH--"handler-name"--.--><
-/- ------CALLFH------------------

Parameters:
handler-name Root-name of a program to be called to act as the file handler. One of:
EXTFH The file handler supplied with this COBOL system
FHREDIR For use with Fileshare Version 2
fhname Name of your own file handler

your own file handler would just have to trap the calls to extfh and then call the appropriate file handler and if successful then do the database update/insert if needed.

You could write your module in either C or COBOL - refer to definition of the filehandler interface