products/sources/formale sprachen/Cobol/verschiedene-Autoren/Rainers-Beispiele/diverse image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

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

Datei: PrintSE.sh   Sprache: Cobol

Original von: verschiedene©

       Identification Division.
       Program-Id. last50.
       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 sql-code   pic S9(8).
       77 sqlx       pic x(80).
       77 result     pic x(80).
       01 this.
         05 log        pic x(80).
       77 die-par    pic x(80).
       Procedure Division.
      * Es werden die letzten 50 LOGIN angelistet
         string " Select sqlx-SMALL-RESULT MAX(lfdnr) as anzahl ";
                " from ta-logging "
         delimited by size into sqlx.
         call MYsqlx-QUERY using sqlx, result
         if result=0 
           display "
F E H L E R
"
 sqlx "
"

           display "
"
 sql-code "
"

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

           into die-par
           call die using die-par
         else
           call MYsqlx-FETCH-array using result 1 row
           move row('anzahl'to anzahl
         end-if
         if anzahl <= 50 
           move 0 to von-lfdnr
         else
           compute von-lfdnr = anzahl - 50;
         end-if
         compute bis-lfdnr = 99;
         string " Select * "
                " from ta-logging ";
                " LIMIT $von-lfdnr,$bis-lfdnr "
         into sqlx
         call MYsqlx-QUERY using sqlx result
         if result=0 then
           display "
F E H L E R
"
 sqlx "
"

           display "
"
 sql-code "
"

           call MYsqlx-CLOSE
           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(result,1) 
             move row to log of this
           end-perform
         end-if
       End-Program last50.

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤





Druckansicht
unsichere Verbindung
Druckansicht
sprechenden Kalenders

in der Quellcodebibliothek suchen




Laden

Fehler beim Verzeichnis:


in der Quellcodebibliothek suchen

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff