× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



No. See example source below:

Thanx, PLA

      PROCESS APOST NOMONOPRC.
      IDENTIFICATION DIVISION.
      PROGRAM-ID. CGICBM24TT.
      AUTHOR. PLA.
      DATE-WRITTEN. 01/22/2001.
     *
     * Intranet links in javascript.
     *
      ENVIRONMENT DIVISION.
      CONFIGURATION SECTION.
      SOURCE-COMPUTER. IBM-AS400.
      OBJECT-COMPUTER. IBM-AS400.
      SPECIAL-NAMES.
      INPUT-OUTPUT SECTION.
      FILE-CONTROL.

      DATA DIVISION.
      FILE SECTION.

      WORKING-STORAGE SECTION.
          EXEC SQL BEGIN DECLARE SECTION END-EXEC.

01 WS-BLANK-USRPRF PIC X(10).

01 WS-Y PIC X(01) VALUE 'Y'.

01 WS-USRPRF PIC X(10).

01 WS-TITLE1 PIC X(50).

01 WS-URL PIC X(132).

EXEC SQL END DECLARE SECTION END-EXEC.

          EXEC SQL
              INCLUDE SQLCA
          END-EXEC.

01 WS-BREAK PIC X(04).

01 X PIC S9(05).

01 Y PIC S9(05).

01 WS-FOREGROUND-COLOR PIC X(10) VALUE 'WHITE'.

01 WS-BACKGROUND-COLOR PIC X(10) VALUE 'NAVY'.

01 WS-SHOW-PULLDOWN-MENU PIC X(10) VALUE 'YES'.

01 WS-SHOW-LINKS PIC X(10) VALUE 'YES'.

01 WS-SHOW-LOGO PIC X(05) VALUE 'YES'.

01 WS-IP PIC X(20).

01 WS-REMOTE-INPUT PIC X(1024).

01 S PIC X(1024).

01 WS-STRING-LENGTH PIC S9(09) BINARY.

01 WS-FILE-STATUS PIC X(02).

01 WS-RCV-STRING PIC X(1000).

01 WS-RCV-LENGTH PIC S9(09) BINARY.

01 WS-RSP-LENGTH PIC S9(09) BINARY.

01 WS-RQS-VARIABLE PIC X(25).

01 WS-RQS-LENGTH PIC S9(09) BINARY.

      01  WS-ERROR-API.
          05 BYTES-INPUT                PIC S9(09) BINARY.
          05 BYTES-OUTPUT               PIC S9(09) BINARY.
          05 EXCEPTION-ID               PIC X(07).
          05 RESERVED-BYTE              PIC X(01).
          05 EXCEPTION-DATA             PIC X(132).

01 LF PIC X(01) VALUE X'15'.

      01  WS-EOF-INDIC                  PIC 1.
          88  END-OF-FILE               VALUE B'1'.
          88  NOT-END-OF-FILE           VALUE B'0'.

PROCEDURE DIVISION.

      OPENING-PARAGRAPH.
          EXEC SQL
            DECLARE C1 CURSOR FOR
              SELECT TITLE1,
                     URL
                FROM QGPL/GPLPFM26D
                WHERE SHOWLINK = :WS-Y AND
                     (USRPRF = :WS-USRPRF OR
                      USRPRF = :WS-BLANK-USRPRF)
                ORDER BY TITLE1
                FOR READ ONLY
          END-EXEC.
          PERFORM INITIALIZATION.
          PERFORM GET-USER-PROFILE.
          PERFORM WRITE-HEADER.
          PERFORM WRITE-LINKS.
          GOBACK.

      WRITE-HEADER.
          STRING 'Content-type: text/html'
                 DELIMITED BY SIZE
                 INTO S
                 POINTER WS-STRING-LENGTH
          END-STRING.
          PERFORM WRITE-TO-STANDARD-OUTPUT 2 TIMES.

      WRITE-LINK.
          STRING "document.write('"
                 '<A HREF="'
                 WS-URL
                 '">'
                 WS-TITLE1
                 '</A>&nbsp;|&nbsp;'
                 "');"
                 WS-BREAK
                 DELIMITED BY '  '
                 INTO S
                 POINTER WS-STRING-LENGTH
          END-STRING.
          PERFORM WRITE-TO-STANDARD-OUTPUT.

      WRITE-LINKS.
          PERFORM OPEN-SQL-FILE.
          PERFORM READ-URL-FILE.
          PERFORM UNTIL SQLCODE NOT = 0
              PERFORM WRITE-LINK
              PERFORM READ-URL-FILE
          END-PERFORM.
          PERFORM CLOSE-SQL-FILE.

     * COPY BOOKS
          COPY GETENV OF CGISRC-QCBLSRC.
          COPY STDOUT OF CGISRC-QCBLSRC.
          COPY GETUSRPRF OF CGISRC-QCBLSRC.

      OPEN-SQL-FILE.
          EXEC SQL
             OPEN C1
          END-EXEC.

      READ-URL-FILE.
          EXEC SQL
            FETCH FROM C1
              INTO :WS-TITLE1,
                   :WS-URL
          END-EXEC.

      INITIALIZATION.
          MOVE SPACES TO S.
          COMPUTE WS-STRING-LENGTH = 1.

      CLOSE-SQL-FILE.
          EXEC SQL
            CLOSE C1
          END-EXEC.

Born, Barbara K wrote:

When using SQL in COBOL programs, does the table need to be included in
the file control section of the program with a Copy DD statement after
the FD in the file section of the program?  If anyone has done this
using SQL to create the table, I would appreciate knowing that it is
possible.  Otherwise, I will use DDS to create the table so that I can
get an external description of the table.  Is there something that I've
forgotten?



_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.