Convert EBCDIC to ASCII

Convert EBCDIC to ASCII

@echo off

@rem Windows batch file to run ConvertEncoding.P0B
@rem
@rem Provides EBCDIC as an abbreviation for CP-037+R80.
@rem
@rem Copyright (C) 2012 Semantic Designs, Inc. All rights reserved.


@rem ----------------------------- Change Log ----------------------------------
@rem
@rem 2012-08-15 RMC First version
@rem
@rem ---------------------------------------------------------------------------

echo on

set INPUT_FILE=C:\ScanDir\LinkageEditorTests\COBOL\CMFIRST.LINKTEST.ZEGXDRV6.V0100.BIN
set OUTPUT_FILE=C:\ScanDir\LinkageEditorTests\COBOL\CMFIRST.LINKTEST.ZEGXDRV6.V0100.BIN.TXT
set INPUT_ENCODING=EBCDIC
set OUTPUT_ENCODING=ISO-8859-1

if not defined INPUT_FILE goto :HELP_MSG
if %INPUT_FILE% == --help goto :HELP_MSG
if %INPUT_FILE% == /help goto :HELP_MSG
if %INPUT_FILE% == /? goto :HELP_MSG

@rem Allow EBCDIC as an abbreviation for encoding CP-037+R80

if /i %INPUT_ENCODING% == EBCDIC set INPUT_ENCODING=CP-037+R80
if /i %OUTPUT_ENCODING% == EBCDIC set OUTPUT_ENCODING=CP-037+R80

run "%DMS_DOMAINS%\..\Executables\ManualTools\ConvertEncoding.P0B" %INPUT_FILE% %OUTPUT_FILE% %INPUT_ENCODING% %OUTPUT_ENCODING%

goto EOF

:HELP_MSG

@echo.
@echo Usage: ConvertEncoding input-file output-file [input-encoding [output-encoding]]
@echo.
@echo Help from ConvertEncoding.P0B...
@echo.
run "%DMS_DOMAINS%\..\Executables\ManualTools\ConvertEncoding.P0B" --help
@echo.
@echo Some encoding names: EBCDIC => CP-037+R80
@echo.

:EOF

    • Related Articles

    • IBM® Enterprise Systems Requirements

      Providing Source Code for Initial CM evolveIT Discovery When providing your Cobol system assets to us for discovery and creation of your initial CM evolveIT repository, please consider the following: Please zip your files and upload to ...
    • Running JCL Scanner by Hand

      Running the MetaAnalytics CAScanner for JCL by hand. Document Version 0.2 Semantic Designs, Inc. August 2014 [0] Introduction This document describes a manual procedure for running the MetaAnalytics JCL CAScanner tool. This procedure scanner supports ...
    • CM evolveIT Administrator Manual

      Please look at the attached file(s)
    • CM evolveIT - Regular Expression Examples

      Please look at the attached file(s)
    • CM evolveIT User Manual

      Welcome to CM evolveIT         User Training Manual                                                             Restrictive Rights This document and the product referenced in it are subject to the terms and conditions of the user License Agreement ...