Thank you for being a valued client of CM First Group. If you have any technical issues or concerns, please open a ticket on support.cmfirstgroup.com, email CM First technical support at support@cmfirstgroup.com or call us on our 24/7 customer hotline at +1 (512) 623-7586.

Follow

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

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk