批处理制作DataStage脚本批量import和compile导入小工具

这是一个批处理脚本,用于生成DataStage的导入(dscmdimport.exe)和编译(dscc)脚本。脚本首先删除已存在的1_import.bat和2_compile.bat文件,然后设置必要的连接参数和路径。接着,它遍历指定目录下的所有子目录,寻找所有的.dsx文件,并为每个文件生成相应的导入和编译命令,将这些命令写入到两个批处理文件中。最后,脚本在每个生成的批处理文件末尾添加暂停命令,以便用户检查结果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

@echo off & setlocal EnableDelayedExpansion
echo 准备生成ETL导入和编译脚本....
pause
if exist 1_import.bat del 1_import.bat
if exist 2_compile.bat del 2_compile.bat
set "import_pre=dscmdimport.exe /H=10.31.24.14 /U=annetl /P=Paic1234"
set "compile_pre=dscc /H 10.31.24.14 /U annetl /P Paic1234"
set "dir_path=C:"
set "soft_path=CD C:\Program Files\Ascential\DataStage7.5.2\"
echo %dir_path%>>1_import.bat
echo %soft_path%>>1_import.bat
echo %dir_path%>>2_compile.bat
echo %soft_path%>>2_compile.bat
for /f "delims=" %%i in ('"dir /ad/b/on "') do (
set folder_path=%%~fi
set folder_name=%%i
for /f "delims=" %%j in ('"dir /a/s/b/on !folder_path!\*.dsx"') do (
set file_name=%%~nj
set file_path=%%~fj
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值