![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I have tried on numerous occasions to create the FOF for the whole system but no matter what I try the file numbers for all NEW files that were not in the original downloaded D3 system (i.e. DM, SQLDEMO etc.) show with a minus sign "next" to them and they do not appear in the FOF. I have tried FILE-SAVE, SAVE (s,f,d,g and SAVE (s,f,d,g,t. Can anyone suggest what I am doing wrong or why this would happen? The system I am working with is D3 7.4.5 on Win2K3 Server and all of the accounts/files in question are FSI's. Thanks. Neil. Neil Charrington S C Systems T: +44 1564 777011 F: +44 1564 777454 W: www.sc-sys.com |
#4
| |||
| |||
|
|
I have tried on numerous occasions to create the FOF for the whole system but no matter what I try the file numbers for all NEW files that were not in the original downloaded D3 system (i.e. DM, SQLDEMO etc.) show with a minus sign "next" to them and they do not appear in the FOF. I have tried FILE-SAVE, SAVE (s,f,d,g and SAVE (s,f,d,g,t. Can anyone suggest what I am doing wrong or why this would happen? The system I am working with is D3 7.4.5 on Win2K3 Server and all of the accounts/files in question are FSI's. Thanks. Neil. Neil Charrington S C Systems T: +44 1564 777011 F: +44 1564 777454 W: www.sc-sys.com |
#5
| |||
| |||
|
|
Neil, I have a solution, see below. In the mean time, about FOF: D3 has two "fof" files: dm,file-of-files, fsi:dm,FileOfFiles, When you do a save, VME items are logged in the first and FSI items are logged in the second. The u90 user exit still doesn't seem to be supported for FSI files. If you look in dm,bp, get-fof you will see a comment by Mark Brown to this effect. If this is code for an end-user site, perhaps part of OSMOSiS, then even if this code worked, you can't really rely on the end-user having a complete set of FOF items in the VME or the FSI. But on to a solution... Create a program called determine.is.file: ---------------------------- abc = "xxx" * comment out following line to test for is.file=0 open 'md' to abc else stop ; * causes is.file to return 1 call test.is.file(abc,is.file) print is.file ---------------------------- Here is program test.is.file: ---------------------------- sub test(var,is.file) common /isfile/ testvar testvar = var open 'md' to f.md else stop ; * handle this better delete f.md, "isfile.":@pib is.file = 0 execute "run bp test.is.file2 (as" read result from f.md,"isfile.":@pib then is.file = 1 else null delete f.md, "isfile.":@pib return ---------------------------- Here is program test.is.file2: ---------------------------- common /isfile/ testvar read dummy from testvar,char(0) else null ; * die here on non-fv open 'md' to f.md else stop ; * handle this better write "x" on f.md,"isfile.":@pib ---------------------------- Test procedure: 1) Create, compile, catalog all programs. 2) Run determine.is.file as-is, result should be 1 for the MD. 3) Comment out line 2 of that prog and re-run, result=0. What's happening is that a read operation on a non-filevar will cause the program to fall to debug. The (as) options on the Run statement in test.is.file change this behavior to a full abort with no error messages. If test.is.file2 does not abort then the var was a filevar and it should write a flag to the md to signal it was able to progress beyond the read. The test.is.file prog will read the md item and set is.file=1. If test.is.file2 does abort then test.is.file won't find a flag in the md and leaves is.file=0. The trick is to get "something else" to abort, other than the program actually testing the var. The var is passed through named common and Execute, since a Call would cause all programs in the stack to abort. HTH. T "Neil Charrington" <neil (AT) casoftware (DOT) co.uk> wrote: I have tried on numerous occasions to create the FOF for the whole system but no matter what I try the file numbers for all NEW files that were not in the original downloaded D3 system (i.e. DM, SQLDEMO etc.) show with a minus sign "next" to them and they do not appear in the FOF. I have tried FILE-SAVE, SAVE (s,f,d,g and SAVE (s,f,d,g,t. Can anyone suggest what I am doing wrong or why this would happen? The system I am working with is D3 7.4.5 on Win2K3 Server and all of the accounts/files in question are FSI's. Thanks. Neil. Neil Charrington S C Systems T: +44 1564 777011 F: +44 1564 777454 W: www.sc-sys.com |
#6
| |||
| |||
|
|
Tony, Thanks for the solution, although this still won't get me the file name. Surely the first 12 lines of the WhatHaveIGot routine from Mike Preece will give the same result or does the line "if CheckIds<2>='' then" rely on there being some data in the file when the line "select FileVariable to CheckIds" is executed? Best regards, Neil. |
![]() |
| Thread Tools | |
| Display Modes | |
| |