Fetch modules and file I/O 
Author Message
 Fetch modules and file I/O

Hello everyone

I am trying to create a general fetch-module that is supposed to update
up to 8 DB2-tabel and VSAM-files, and sends PUT SKIPs for each call. The
number of tables/files to update will change over time, so I need a
fetch module.

+-------------+    +--------------+    +-----------+
| MAIN-MODULE |--->| FETCH-MODULE |<-->| VSAM-FILE |
+-------------+    +--------------+    +-----------+

My problem:
 is that I can't seem to get fetch modules to use streams nor files. The
DB2 I/O part shouldn't bee any problem (so I've heard).

How can I use streams (put skip) in my fetch modules?
- I Found out that if I use a put skip statement i my main-module it
doesn't crash.

How can I use VSAM-files in my fetch module?
- I tried declaring, opening in the main-module and read-/writing in the
fetch-module. Result:Protection exception.
- I tried declaring, opening and read-/writing in the fetch-module.
Result:Protection exception.

If I can't use VSAM-files, how can it be that DB2 is usable when there
is VSAM beneath DB2?

--
Thank you
Magnus Oddsson



Sun, 06 Aug 2000 03:00:00 GMT  
 Fetch modules and file I/O

There are some restrictions on what you can do in FETCHed routines with files (and
controlled variables). The programming guide has more details on this, but if you want
to open a file in main and and use it in a FETCHed routine (or vice versa), you should
probably do this by passing a FILE VARIABLE to the FETCHed routine.



Mon, 07 Aug 2000 03:00:00 GMT  
 Fetch modules and file I/O

Quote:

>How can I use VSAM-files in my fetch module?
>- I tried declaring, opening in the main-module and read-/writing in the
>fetch-module. Result:Protection exception.
>- I tried declaring, opening and read-/writing in the fetch-module.
>Result:Protection exception.

Declare, open (and close finally) in main module. Pass as FILE parameter to
fetch-module.

CUL8R!

Ing. Michael Fitz
A-2410 Hainburg; Carnuntumstr. 21

=== PGP-Key on request ===



Mon, 07 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Fetch modules

2. using os module to copy files on windows

3. os module and sys module~

4. OS-specific modules to OS-specific packages

5. Question about Access:File.fetch(Key) ...

6. Fetch files without ftp?

7. Fetching file path in tcl

8. OS/2: Rexx Script from Win-OS file manager

9. modula2, modules, OS/2

10. OS/2 Module 2 Books

11. What to use for OS-specific module namespaces?

12. Getting Module name (under LE - on OS/390)

 

 
Powered by phpBB® Forum Software