Re: Umwandel Hex 'C1' to BLANK mit cobol.

From: Karl Kiesel (Karl.Kiesel_at_fujitsu-siemens.com)
Date: 01/19/04


Date: Mon, 19 Jan 2004 09:39:42 +0100

john schrieb:
> ich habe da ein kleines Problem mit Cobol. Ich habe Daten die an der
> ersten Stelle ein nicht abdruckbares Steuerzeichen enthalten. Hex ist
> es C1.
>
> Diese Zeichen will ich durch ein Blank ersetzen und vorher ein
> Leerzeile einfuegen.
>
> Was muss ich tun damit ich auf Hex C1 abfragen kann ?

Hallo John,
wenn das Programm auf einer 'EBCDIC-Hardware' ablaufen soll, dann
entspricht X'C1' einem grossen 'A' und koennte direkt so abgefragt
werden; flexibler ist aber die Definition eines symbolic character:
 ...
 ENVIRONMENT DIVISION.
 CONFIGURATION SECTION.
 ...
 SPECIAL-NAMES.
 ...
  SYMBOLIC CHARACTERS hex-c1 IS 194
 ...
und das dann in den Abfragen verwenden oder als Wert in einem
conditionnamen für das erste Byte des Satzes, etwa
  88 vorschub VALUE hex-c1.
(Anmerkung: in der Symbolic characters Angabe duerfen mehrere solche
Namen definiert werden; der Dezimalwert entspricht der Position des
hexzeichens im Zeichenvorrat der Hardware, wobei COBOL ab 1 (nicht 0!)
zaehlt - Details siehe im Sprachmanual zu Deinem Compiler!)

Karl Kiesel
Fujitsu Siemens Computers GmbH, München



Relevant Pages

  • RE: Running COBOL under z/os.e
    ... >> I was thinking of CGIs. ... >> developing CGI-like applications in COBOL easier. ... I wish that we were in the position to use some training, but z/OS is ... John McKown ...
    (bit.listserv.ibm-main)
  • Re: Dynamically Calling PKZIP
    ... John ... > I have an application that creates a flat EDI file that must be zipped ... > fly from within the Cobol application. ... A compiler change is not an option. ...
    (comp.lang.cobol)
  • Re: Dynamically Calling PKZIP
    ... John ... > fly from within the Cobol application. ... A compiler change is not an option. ... > MSDOS prompt, and no zip file is created. ...
    (comp.lang.cobol)
  • Re: Recommended MSWindows COBOL compiler.
    ... > are LOTS of Windows COBOL compilers, ... compiler will handle the SCREEN section and/or DISPLAY/ACCEPT LINE x COLUMN ... installing it on MSWin is an adventure even for the experienced. ... John Culleton ...
    (comp.lang.cobol)