Transfer-Script

Hello,

I’m searching for a transfer-script, which transfers natural-moduls from one developing enviroment to another.

The transfer-script should copy the Source-File, add the file to the Lib and STOW the new modul.

Has anybody such a shell-script?

Regards
Markus Wessjohann

Hello mwessjoh!

SYSOBJH is your friend! :wink: So I would do the following steps:

  1. Unload the module using SYSOBJH
  2. copy the file if necessary
  3. Load the module using SYSOBJH
  4. do a cat/stow

Here’s the documenation to use SYSOBJH in batchmode:

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat639unx/utis/sysobjh_gen_info.htm#sysobjh_gen_info_Batch

To do a stow in batchmode, I would try something like that:

natural .... stack='(logon lib; read MYPROG0N; stow; fin)'

matthias

Hello,

I’m searching for a transfer-script, which transfers natural-moduls from one developing enviroment to another.

The transfer-script should copy the Source-File, add the file to the Lib and STOW the new modul.

Has anybody such a shell-script?

Regards
Markus Wessjohann

quick’n’dirty: A bash-Script doing steps 1+3+4

#!/usr/bin/bash

cmsynin=/tmp/mysynin
cmobjin=/tmp/myobjin
cmprint=/tmp/mycmprint
cmprint2=/tmp/mycmprint2
report=/tmp/myreport
export WRKF1=/tmp/myworkfile01  # as defined in natparm
export WRKF3=/tmp/myworkfile03  # as defined in natparm
prog=MYPROG0N
lib=MYLIB

echo -e "SYSOBJH\nFIN" > $cmsynin
echo -e "UNLOAD $prog LIB $lib DBID 32 FNR 10 OBJTYPE N\n." > $cmobjin
natural batchmode bp=bp1 parm=parm1 cc=on cmsynin=$cmsynin cmobjin=$cmobjin cmprint=$cmprint

echo -e "SYSOBJH\nLOGON $lib\nread $prog\nSTOW\nFIN" > $cmsynin
echo -e "LOAD * LIB * DBID 32 FNR 11 WHERE REPLACE ALL REPORT $report\n." > $cmobjin
natural batchmode bp=bp2 parm=parm2 cc=on cmsynin=$cmsynin cmobjin=$cmobjin cmprint=$cmprint2