products/Sources/formale Sprachen/Cobol/verschiedene-Autoren/Rainers-Beispiele image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: README.txt   Sprache: Cobol

Original von: verschiedene©

       Identification Division.
       Program-Id. last50s.
       Environment Division.
       Input-Output Section.
       Data Division.
       Working-Storage Section.
       01 row        pic S9(8) occurs 100.
       77 anzahl     pic S9(8).
       77 von-lfdnr  pic S9(8).
       77 bis-lfdnr  pic S9(8).
       01 mysqlx-fetch-array occurs 100.
         05 zeile pic X(80).
       77 sqlx       pic x(80).
       01 this.
         05 log        pic x(80).
       77 die-par    pic x(80).
        EXEC SQL INCLUDE SQLCA END-EXEC.
       Procedure Division.
      * Es werden die letzten 50 LOGIN angelistet
         exec sql
           Select max(lfdnr)
           into   :anzahl
           from   ta_logging
         end-exec.
         if sqlcode not= 0 
           display "
F E H L E R
"
 sqlx "
"

           display "
"
 sqlcode "
"

           call MYsqlx-CLOSE
           string "ABBRUCH: Fehler beim Lesen ta-logging für "
                  "Statuskontrolle (select #3)
"

           into die-par
           call die using die-par
         end-if
         if anzahl <= 50 
           move 0 to von-lfdnr
         else
           compute von-lfdnr = anzahl - 50
         end-if
         compute bis-lfdnr = 99
         exec sql
           Select *
           into :mysqlx-fetch-array
           from ta_logging
         end-exec  
         if sqlcode not = 0 then
           display "
F E H L E R
"
 sqlx "
"

           display "
"
 sqlcode "
"

           string "ABBRUCH: Fehler beim Lesen ta-logging für "
                  "Statuskontrolle (select #4)
"

           delimited by size into die-par
           call die using die-par
         else
           perform until row not= mysqlx-FETCH-array(row, 1) 
             move row to log of this
             add 1 to row
           end-perform
         end-if
       End-Program last50s.

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤





Druckansicht
unsichere Verbindung
Druckansicht
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff