|
Post by rprinceton on Jun 22, 2023 14:53:22 GMT -5
Hello, I'm not sure if I've uncovered a bug or I have something not set up properly. I have defined a profile named A100.ini. The intent is to start SPFLite specifying both the file to open and the override profile i.e., A100. I've created a shortcut. The Target field of the shortcut is specified as: C:\SPFLite2\SPFLite2.exe "t:\AST.DMIGR.DEE08.LC01.MFIMPRPT.DAT" .A100 When clicked on an SPFLite dialog is presented stating that the "No profile exists for file-type A100 and wants to create it. The fact is that the profile does exist. It appears that SPFLite has lost track of where the Profiles folder resides. Can you assist? Thank you. Regards, Randall Princeton
|
|
|
Post by George on Jun 22, 2023 15:13:40 GMT -5
Hi Randall: If you're talking profile files kept in INI files, then you must be running a very old version of SPFLite. The latest version version is 3.0.23169.
The Profiles are not stored in INI files any longer, all the configuration variables are maintained in a single .CFG file.
Please try and upgrade to the current version. However I will say that the latest version does not have the auto-migration facility to move your old INI profiles to the new CFG format. That kind of support only works if you stay fairly current on your running version.
Let me know how you do, and I will try to help you over any difficulties.
George
|
|
|
Post by rprinceton on Jun 23, 2023 7:21:35 GMT -5
Hello George, I have installed the latest version. Please allow me to state my objective. I want to "predefine" profiles before invoking SPFLite i.e., specify the "predefined" profile on the command line. I exported the CFG using CFGMaint. After a bit of analysis I can see a section name [Pxxxx] which defines a profile. I also read that the "-IMPORT" can import individual tables (sections). I created an import file having a single profile table. I then used the CFGMaint program to import the new profile. CFGMaint did not report any errors, however it does not appear to have performed the import i.e., the profile is not found. Since SPFLite.CFG file is in a proprietary format I have no way of knowing if the profile was imported other than the fact when I use SPFLite2.exe "some.file.name" .NewProfile on the command line, the .NewProfile is not found. Did I perhaps miss something regarding the correct way to import? Know way of knowing. Can you assist. Thank you. Randall Princeton
|
|
|
Post by George on Jun 23, 2023 10:43:22 GMT -5
Randall: What you describe should have worked.
Go to Options => Config and browse the list to see if the Profile was created. If CFGMaint had a problem importing, it should have reported some kind of error.
If it is not there: One way to pre-create Profiles is to Enter PROF NEW A100 You'll get a normal Profile Edit dialog where you can set whatever values are appropriate.
If you want to do this outside SPFLIte, then the CFGMaint approach should work with the command:
CFGMAINT -IMPORT "C:\MyFiles\CFGMAINT_File.TXT"
And the TXT file should contain: [PA100] ACTION=0 AUTOBKUP=0 AUTOCAPS=0 AUTONUM=0 AUTOSAVE=2 BNDL=1 . . ========= (at least 8 =)
Check these out and if still no error message from CFGMaint and still no Profile created, then send me your Import file and I'll check what's going on.
Check your SPFLite data folder for a file named like: D:\Documents\SPFLite\CFGMaint LOG 2023-06-18 13.12.TXT
Any errors will be reported in there.
George
|
|
|
Post by rprinceton on Jun 23, 2023 12:16:43 GMT -5
Hello George, I am all but convinced the import has some type of issue. CFGMaint does go thru the motions of an import. No log was produced so assumption is import worked. The SPFLite.cfg has a new timestamp so it definitely was touched. I viewed the SPFLite.cfg with an SQLLite tool and I do not see the new profile. Using CFGmaint I exported the SPFLite .cfg file after the import of a new profile. The profile does not show up. Also in SPFLite> Configs, no new profile shows. I've cut and pasted the contents of my import file for your edification. See below:
[PL075] ACTION=0 AUTOBKUP=0 AUTOCAPS=0 AUTONUM=0 AUTOSAVE=1 BNDL=1 BNDR=0 BOM=0 CAPSFLAG=0 CASE=T CHANGE=D COLLATE=ANSI COLSFLAG=1 EMACRO= EOLFLAG=NONE FOLDFLAG=0 HEXMFLAG=1 HIAUTO=1 HIFIND=1 IMACRO= IMPORTTABS=4 LASTACCESS=2023-06-23 10:00 LRECL=75 MARK= MARKFLAG=1 MASK= MINLEN=0 NUMTYPE= PAGE=0 PAGEOFFSET=0 PRESERVE=0 PROFLOCK=1 PROFUSING= RECFM=F SCROLLAMOUNT=CSR SOURCE=ANSI START=FIRST STATEFLAG=0 SUBARG= SUBCMD= TABS= * * TABSFLAG=1 UNDOLEVELS=10 WORD=A-Z a-z 0-9 XFORM= ========
Thank you, Randall Princeton
|
|
|
Post by Robert on Jun 23, 2023 12:32:43 GMT -5
But Randall, I thought the profile name was A100, yet your file shown above says PL075.
Can you explain this? Am I missing something here?
|
|
|
Post by George on Jun 23, 2023 13:19:18 GMT -5
Randall: oing to have to look at this, it IS failing to create the Profile. There is a LOG file created, but nothing unusual in it.
CFGMaint - CFGMaint Version 3.0.23169 LOG CFGMaint - Temporary LOG location SET TO: C:\Users\George Deluca\Desktop\ CFGMaint - Log file location switched TO: D:\Documents\SPFLite\ CFGMaint - Running WITH: -IMPORT "C:\USERS\GEORGE DELUCA\DESKTOP\PL075.TXT" -QUIET CFGMaint - Running WITH HomeFolder: D:\Documents\SPFLite\ CFGMaint - Running WITH HomeData : D:\Documents\SPFLite\ CFGMaint - Validating table: PL075 CFGMaint - Table: PL075, Entry: LASTACCESS=2023-06-23 10:00, IS invalid, It will be corrected TO: 2023-06-23 14:10 CFGMaint - CFG entries re-loaded successfully, items corrected: 1
It lies, the profile wasn't created. Stay tuned.
George
|
|
|
Post by George on Jun 23, 2023 14:14:21 GMT -5
Randall: I know this sounds stupid, but CFGMaint -IMPORT filename runs by default in QUIET mode. In QUIET mode, any error will fail the function.
The LASTACCESS entry in your config file was invalid, and it was corrected (as seen in the LOG file)
The error? Only 1 blank between the date and the time. A nit, but enough to flag it as invalid. and that killed the actual load.
How did it get that way? Who knows. An EXPORT formats it correctly.
So... add another space to the LASTACCESS line, and try again, I'm sure it will be fine.
George
|
|
|
Post by rprinceton on Jun 23, 2023 14:58:11 GMT -5
Hello George, My import file does have two spaces between date and time and still fails. When I pasted it into the forum the extra space must have been squeezed. So I still think there is an issue. Regards, Randall Princeton
|
|
|
Post by Robert on Jun 23, 2023 15:35:52 GMT -5
But, what about the A100 vs. PL075 issue? Is that a typo or did you use two different names?
|
|
|
Post by George on Jun 23, 2023 16:05:39 GMT -5
Randall: I don't know what to say. Your data was failing for me. I added the extra space. And it now works normally.
??
George
|
|
|
Post by mueh on Jun 24, 2023 0:19:49 GMT -5
Randall: Try CFGMAINT -import without filename . CFGMAINT will prompt you for one and select it . In this case it should NOT run in -QUIET mode as George sayed .
|
|
|
Post by rprinceton on Jun 24, 2023 7:36:14 GMT -5
All, Thanks to everyone for your replies. I am going to try the suggestions. If George says it works it points to something on my side. With regard to PA100 vs PL075, I have been testing with many profiles trying to see a pattern. I apologize for the confusion. Hopefully I can track this down. Kindest regards, Randall Princeton
|
|
|
Post by George on Jun 24, 2023 8:45:37 GMT -5
Randall: I have a feeling that by trying to pre-create Profiles, you have a situation where you receive a lot of files with varying file-types, and you want to pre-create the profile to avoid answering pop-ups.
If so, explore using the EFT support (Extended File Types). This allows you to specify a 'mask' to match filenames and specify the Profile name to be used. Maybe you can use this to 'trap' all these files and point them at one common Profile. Once and done.
The masks can be done using a simplified syntax, or you can use full-blown RegEX expressions if needed.
George
|
|
|
Post by rprinceton on Jun 24, 2023 9:14:20 GMT -5
All, I took mueh's suggestion i.e., I ran CFGMaint -IMPORT with no file specification. It presents a dialog in which to navigate to the file to be imported. This method does import the profile! It also proves the integrity of my import file. I then revisited trying to specify my import file on the shortcut to CFGMaint. I tried many ways in which to specify the file name e.g., DOS 8.3, all caps, all lowercase, CaMel case, no-quotes, with quotes. I even wrote an AutoIt program to run CFGMaint as a direct execution i.e., no Windows shortcut. I forced a bad file name to see if it catches it, and as expected, reports the file as not found. In every case I can see that file SPFLite.CFG gets "touched" because the timestamp changes but in each case the profile does not get imported. Have any of you tried specifying a file name on a Windows shortcut to the CFGMaint executable? I would like to know if this works on your respective systems, because if it does work then it is on my side somewhere. Thank you for your continued support. Regards, Randall Princeton
|
|