Skip to content

Instantly share code, notes, and snippets.

@wuftymerguftyguff
Last active August 11, 2018 11:37
Show Gist options
  • Save wuftymerguftyguff/f5309234ae839ffbc3d1f8a2034590d4 to your computer and use it in GitHub Desktop.
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
#!/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
@wuftymerguftyguff
Copy link
Author

Remove -nolog as caused an issue with some split BW tables. (SAP no longer recommend this option)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment