Last active
August 11, 2018 11:37
-
-
Save wuftymerguftyguff/f5309234ae839ffbc3d1f8a2034590d4 to your computer and use it in GitHub Desktop.
Script to generate a template OrderBy.txt file for SAP R3load import when using splits on DB2LUW
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
SID=$1 | |
#cd /migration/$SID/exp/010715/ABAP/DATA | |
list=$(ls -la *.WHR | awk -F ' ' '{print $9}' | sed -e 's/\.WHR//g') | |
prev_table="" | |
for l in $list | |
do | |
table=$(echo $l | sed -e "s/-.*//g") | |
tableu=$(echo $table | tr '[a-z]' '[A-Z]') | |
if (test "$prev_table" != "$table") then | |
echo | |
echo "[""$tableu""]" | |
echo "jobNum=1" | |
echo "loadArgs=-loadprocedure fast LOAD_FORCED:COMPRESS_ALL:DEF_CRT -merge_bck" | |
fi | |
echo $l | |
prev_table=$table | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remove -nolog as caused an issue with some split BW tables. (SAP no longer recommend this option)