I have a batch wiht 1 parameter from user and store the parameter %1 as variable.
then I will write that value in a file, that contains an SQL insert command. The problem is to give that variable value for further processing.
Parameter:
Code: Select all
::parameter usage
::Changenr. angegeben, dann fortfahren, sonst Usage anzeigen und exit
if [%1]==[] goto usage
::Variable für Param 1
set chnr=%1
echo "changnr: %chnr%"
::exit ohne DOS-Fenster schließen
:usage
@echo Usage: Changenr von cm_prod fünfstellig angeben! Bsp: mergeAPM-file.bat 12345
exit /B 1
File zd_zd.txt contains the sql statement: part APMoA Changenr. %chnr%' should be the contain the given changenumber value
--gültig bis Vortag nächste APMoA
Code: Select all
insert into ZD_ZD(ZDS,ZDAUSFUEHRUNGSDATUM,ZDREGELUPDATE,ZDDATV,ZDDATB,ZDPRODUKT,ZDPRODUKTRELEASE,ZDPRODUKTRELEASEVERSION)
values(to_char(sysdate,'YYYYMMDDHH24SS'),sysdate,'APMoA vom '||to_char(sysdate,'DD')||'.'|| to_char(sysdate,'MM')||'.'||to_char(sysdate,'YYYY')||' '||to_char(sysdate,'HH24')||':'||to_char(sysdate,'SS'),to_char(sysdate,'YYYYMMDD'),to_char(sysdate+6,'YYYYMMDD'),'Zentraldateien 1.0',to_char(sysdate,'YYYY'),'APMoA Changenr. %chnr%');
Does anyone have a hint ?
Thanks
Kerstin