kduke wrote:Code: Select all
Cmd = 'SELECT DS_JOBS SAVING UNIQUE CATEGORY TO 3'
execute Cmd capturing output
loop while readnext CatName from 3
... run genhtml job here ...
repeat
To run a job in job control then there is a drop down list of jobs. Pick the right and it will add the code needed to run this job.
Hi Kim, Yes many thanks again for your help.
So, I tried your code for generation and it works in my environment.
There is only one thing which keep bugging !
This code doesn't work with sub-categories !
In fact, HTML generation of All_index with links to categories HTML files doesn't work with sub-caterogies because code generates links like that :
In all_index.Html I've these links :
Code: Select all
file:///projectDir/__documentation/Jobs/20061204/6fret/W6FRET_index.html
Where 6fret is a category and W6fret is its sub-category.
But in my generated documentation I've these HTML files :
Code: Select all
6fret_Index.htm (for 6fret category)
6fret_W6FRET_Index.html (For W6fret sub-category of 6fret)
So I have an error 404 because HTML files are not generated in sub-directories by sub-categories.
So I must find a way to generate links like that in my index fo categories :
Code: Select all
file:///projectDir/__documentation/Jobs/20061204/6fret_W6FRET_index.html
instead of
file:///projectDir/__documentation/Jobs/20061204/6fret/W6FRET_index.html
So I tried this :
add a Replace function in SQL query to replace category/subcategory.html by category_subcategory.HTML (to match with files generated by HTML generation code. To make this, I've coded this query in execution of KgdGenHtmlFromSql :
Code: Select all
SELECT DISTINCT REPLACE(CATEGORY, '\', '_') || '_index.html' FROM DS_JOBS order by 1
I also try with '/' instead of '\' in replace parameters.
But generated All_index.html file is empty, query returns no categories.
Thanks to help me with this last step before VICTORY ! :D
Many many thanks to you Kim.