Menu

Automatic doc generation

Lance Chen
2004-01-06
2004-01-06
  • Lance Chen

    Lance Chen - 2004-01-06

    I have created a .bat and .sql file for document automation.
    ------------------------------------------------
    --****************************************************************************************************
    -- pkg_dump.sql
    -- generate &1.psk
    --*****************************************************************************************************
    PROMPT "Enter the file_name, the extension must be .psk (ie : 20030813.psk) "
    ACCEPT file_name CHAR FORMAT 'A30'  PROMPT 'filename.psk:>'

    COL SORT1 NOPRINT
    COL SORT2 NOPRINT
    COL SORT3 NOPRINT
    COL SORT4 NOPRINT
    BREAK ON SORT1 SKIP 1
    set linesize 120
    SET HEADING OFF
    SET ECHO OFF
    SET FEEDBACK OFF
    SET PAGESIZE 0
    SPOOL &&file_name

    SELECT NAME SORT1, LINE SORT2,
    'Create or Replace ' || TEXT
    FROM USER_SOURCE
    WHERE TYPE = 'PACKAGE'
    AND LINE = 1
    UNION
    SELECT NAME SORT1, LINE SORT2,
    TEXT
    FROM USER_SOURCE
    WHERE TYPE = 'PACKAGE'
    AND LINE > 1
    UNION
    SELECT NAME SORT1, 999999 SORT2,
    '/'
    FROM USER_SOURCE
    WHERE TYPE = 'PACKAGE'
    AND LINE = 1
    ORDER BY 1,2;

    spool off
    exit
    ------------------------------------------------
    REM
    REM doc_generate.bat
    REM
    set pldoc=o:/pldoc
    set user=user
    set pass=pass
    set tns=tns_name
    set source=
    set doc=doc
    sqlplus %user%/%pass%@%tns% @pkg_dump.sql
    set classpath=%classpath%o:/pldoc;

    call o:/pldoc/pldoc.bat -doctitle \"ora_serv1 package doc\" -d %doc% %source%*.psk
    PAUSE
    -------------------------------------------------

     
    • Albert Tumanov

      Albert Tumanov - 2004-01-06

      Thanks Lance !
      I hope people will find it useful.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.