123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- @rem Licensed Materials - Property of IBM
- @rem IBM Cognos Products: cclcore
- @rem (C) Copyright IBM Corp. 2005, 2010
- @rem US Government Users Restricted Rights - Use, duplication or disclosure restricted
- @rem by GSA ADP Schedule Contract with IBM Corp.
- @echo off
- for /F "usebackq tokens=*" %%A in (`dir icucogdt36l\cnvalias.icu /B/S`) do (
- set cur_name=%%A
- set cur_size=%%~zA
- )
- for /F "usebackq tokens=*" %%A in (`dir icucogdt36l\cnvalias_compat.icu /B/S`) do (
- set compat_name=%%A
- set compat_size=%%~zA
- )
- for /F "usebackq tokens=*" %%A in (`dir icucogdt36l\cnvalias_original.icu /B/S`) do (
- set orig_name=%%A
- set orig_size=%%~zA
- )
- set status=0
- if not {%1}=={} (goto :param)
- if %cur_size%==%compat_size% (
- echo CRN Compatibility mode is ON
- set status=1
- )
- if %cur_size%==%orig_size% (
- echo CRN Compatibility mode is OFF
- set status=0
- )
- goto :end
- :param
- set er1=Invalid parameter: %1
- set er2=Invalid parameter value: %2
- set h1=Usage: "conv_compat.cmd [-CRN_Compatibility=<on|off>]"
- set h2=Turns on or off Cognos ReportNet compatibility mode.
- if /i not %1==-CRN_Compatibility (
- echo %er1%
- echo %h1%
- echo %h2%
- set status=2
- )
- if /i not %2==off (
- if /i not %2==on (
- echo %er2%
- echo %h1%
- echo %h2%
- set status=2
- )
- )
- if %status%==2 (
- goto :end
- )
- if /i %2==on (
- if %cur_size%==%orig_size% (
- copy /y %compat_name% %cur_name%
- if %errorlevel%==0 (
- echo CRN Compatibility mode is switched to ON
- set status=1
- ) else (
- echo An unexpected error occured, please contact Cognos custommer support.
- set status=2
- )
- ) else (
- echo CRN Compatibility mode is ON
- set status=1
- )
- )
- if /i %2==off (
- if %cur_size%==%compat_size% (
- copy /y %orig_name% %cur_name%
- if %errorlevel%==0 (
- echo echo CRN Compatibility mode is switched to OFF
- set status=0
- ) else (
- echo An unexpected error occured, please contact Cognos custommer support.
- set status=2
- )
- ) else (
- echo CRN Compatibility mode is OFF
- set status=0
- )
- )
- :end
- exit /b %status%
|