Skip to content
Permalink
Browse files

Merge pull request #73 from lotsaram/master

include pSuppressConsol in data.copy
  • Loading branch information...
lotsaram committed Aug 7, 2019
2 parents b731466 + 56d93b2 commit 0bd4bbefd10fef0f70274625294cdfeb9ff46edb
@@ -138,7 +138,7 @@ cThisProcName = GetProcessName();
cUserName = TM1User();
cMsgErrorLevel = 'ERROR';
cMsgErrorContent= 'Process:%cThisProcName% ErrorMsg:%sMessage%';
cLogInfo = 'Process:%cThisProcName% run with parameters pCube:%pCube%, pView:%pView%, pFilter:%pFilter%, pFilterParallel:%pFilterParallel%, pParallelThreads:%pParallelThreads%, pDimDelim:%pDimDelim%, pEleStartDelim:%pEleStartDelim%, pEleDelim:%pEleDelim%, pCubeLogging:%pCubeLogging%, pTemp:%pTemp%.' ;
cLogInfo = 'Process:%cThisProcName% run with parameters pCube:%pCube%, pView:%pView%, pFilter:%pFilter%, pFilterParallel:%pFilterParallel%, pParallelThreads:%pParallelThreads%, pDimDelim:%pDimDelim%, pEleStartDelim:%pEleStartDelim%, pEleDelim:%pEleDelim%, pCubeLogging:%pCubeLogging%, pTemp:%pTemp%, pSandbox:%pSandbox%';
cTimeStamp = TimSt( Now, '\Y\m\d\h\i\s' );
cRandomInt = NumberToString( INT( RAND( ) * 1000 ));
cDefaultView = Expand( '%cThisProcName%_%cTimeStamp%_%cRandomInt%' );
@@ -25,7 +25,7 @@
569,0
592,0
599,1000
560,21
560,22
pLogOutput
pCube
pSrcView
@@ -39,6 +39,7 @@ pDimDelim
pEleStartDelim
pEleDelim
pFactor
pSuppressConsol
pSuppressRules
pCumulate
pZeroTarget
@@ -47,7 +48,7 @@ pTemp
pCubeLogging
pSandbox
pThreadMode
561,21
561,22
1
2
2
@@ -69,7 +70,9 @@ pThreadMode
1
2
1
590,21
2
1
590,22
pLogOutput,0
pCube,""
pSrcView,""
@@ -83,6 +86,7 @@ pDimDelim,"&"
pEleStartDelim,"¦"
pEleDelim,"+"
pFactor,1
pSuppressConsol,1
pSuppressRules,1
pCumulate,0
pZeroTarget,1
@@ -91,7 +95,7 @@ pTemp,1
pCubeLogging,0
pSandbox,""
pThreadMode,0
637,21
637,22
pLogOutput,"Optional: write parameters and action summary to server message log (Boolean True = 1)"
pCube,"REQUIRED: Cube"
pSrcView,"OPTIONAL: Temporary view name for source"
@@ -105,6 +109,7 @@ pDimDelim,"REQUIRED: Delimiter for start of Dimension/Element set (default valu
pEleStartDelim,"REQUIRED: Delimiter for start of element list (default value if blank = '¦')"
pEleDelim,"REQUIRED: Delimiter between elements (default value if blank = '+')"
pFactor,"OPTIONAL: Multiply source value by factor (1 keeps the value as is). To modify existing values make the target element the same as the source with pZeroTarget = 0"
pSuppressConsol,"OPTIONAL: Suppress Consolidated Cells (Skip = 1)"
pSuppressRules,"OPTIONAL: Suppress Rules (Skip = 1)"
pCumulate,"OPTIONAL: 1 = Add source to existing value in target (if zero out target = 0 False). 0 = Replace target with source."
pZeroTarget,"OPTIONAL: Zero out Target Element PRIOR to Copy? (Boolean 1=True)"
@@ -426,7 +431,7 @@ VarType=32 ColType=827
VarType=32 ColType=827
VarType=33 ColType=827
603,0
572,795
572,797
#Region CallThisProcess
# A snippet of code provided as an example how to call this process should the developer be working on a system without access to an editor with auto-complete.
If( 1 = 0 );
@@ -435,7 +440,7 @@ If( 1 = 0 );
'pFilterParallel', '', 'pParallelThreads', 0,
'pEleMapping', '', 'pMappingDelim', '->',
'pDimDelim', '&', 'pEleStartDelim', '¦', 'pEleDelim', '+',
'pFactor', 1, 'pSuppressRules', 1, 'pCumulate', 0,
'pFactor', 1, 'pSuppressConsol', 1, 'pSuppressRules', 1, 'pCumulate', 0,
'pZeroTarget', 1, 'pZeroSource', 0,
'pTemp', 1, 'pCubeLogging', 0, 'pSandbox', ''
);
@@ -487,7 +492,7 @@ cRandomInt = NumberToString( INT( RAND( ) * 1000 ));
cTempSub = cThisProcName |'_'| cTimeStamp |'_'| cRandomInt;
cMsgErrorLevel = 'ERROR';
cMsgErrorContent= 'Process:%cThisProcName% ErrorMsg:%sMessage%';
cLogInfo = 'Process:%cThisProcName% run with parameters pCube:%pCube%, pSrcView:%pSrcView%, pTgtView:%pTgtView%, pFilter:%pFilter%, pFilterParallel:%pFilterParallel%, pParallelThreads:%pParallelThreads%, pEleMapping:%pEleMapping%, pMappingDelim:%pMappingDelim%, pDimDelim:%pDimDelim%, pEleStartDelim:%pEleStartDelim%, pEleDelim:%pEleDelim%, pFactor:%pFactor%, pSuppressRules:%pSuppressRules%, pCumulate:%pCumulate%, pZeroTarget:%pZeroTarget%, pZeroSource:%pZeroSource%, pTemp:%pTemp%, pCubeLogging:%pCubeLogging%.' ;
cLogInfo = 'Process:%cThisProcName% run with parameters pCube:%pCube%, pSrcView:%pSrcView%, pTgtView:%pTgtView%, pFilter:%pFilter%, pFilterParallel:%pFilterParallel%, pParallelThreads:%pParallelThreads%, pEleMapping:%pEleMapping%, pMappingDelim:%pMappingDelim%, pDimDelim:%pDimDelim%, pEleStartDelim:%pEleStartDelim%, pEleDelim:%pEleDelim%, pFactor:%pFactor%, pSuppressConsol:%pSuppressConsol%, pSuppressRules:%pSuppressRules%, pCumulate:%pCumulate%, pZeroTarget:%pZeroTarget%, pZeroSource:%pZeroSource%, pTemp:%pTemp%, pCubeLogging:%pCubeLogging%, pSandbox:%pSandbox%';
cDefaultView = Expand( '%cThisProcName%_%cTimeStamp%_%cRandomInt%' );

## LogOutput parameters
@@ -696,7 +701,7 @@ sElementStartDelim = TRIM( pEleStartDelim );
sDelimDim = TRIM( pDimDelim );
sFilter = TRIM( pFilter);
sTargetFilter = '';
sSuppressConsol = 1;
nSuppressConsol = pSuppressConsol;
nSubN = 0;
nChar = 1;
nCharCount = LONG( sElementMapping );
@@ -893,7 +898,9 @@ If( nCharCount > 0 );

If ( DTYPE( sDimension, sElement) @= 'C' );
IF( nElementCount = 1 );
sSuppressConsol = 0;
If( pSuppressConsol <> 1 );
nSuppressConsol = 0;
EndIf;
nSubN = 1;
Else;
sMessage = Expand( 'Target element: %sElement% for dimension %sDimension% is consolidated' );
@@ -1138,7 +1145,7 @@ If( Scan( pEleStartDelim, pFilterParallel ) > 0 );
'pCube', pCube, 'pSrcView', pSrcView, 'pTgtView', pTgtView,
'pFilter', sFilter, 'pFilterParallel', '', 'pEleMapping', pEleMapping, 'pMappingDelim', pMappingDelim,
'pDimDelim', pDimDelim, 'pEleStartDelim', pEleStartDelim, 'pEleDelim', pEleDelim,
'pFactor', pFactor, 'pSuppressRules', pSuppressRules, 'pCumulate', pCumulate,
'pFactor', pFactor, 'pSuppressConsol', pSuppressConsol, 'pSuppressRules', pSuppressRules, 'pCumulate', pCumulate,
'pZeroTarget', pZeroTarget, 'pZeroSource', pZeroSource, 'pTemp', pTemp, 'pCubeLogging', pCubeLogging, 'pSandbox', pSandbox, 'pThreadMode', 1
);
nThreadElCounter = 0;
@@ -1151,7 +1158,7 @@ If( Scan( pEleStartDelim, pFilterParallel ) > 0 );
'pCube', pCube, 'pSrcView', pSrcView, 'pTgtView', pTgtView,
'pFilter', sFilter, 'pFilterParallel', '', 'pEleMapping', pEleMapping, 'pMappingDelim', pMappingDelim,
'pDimDelim', pDimDelim, 'pEleStartDelim', pEleStartDelim, 'pEleDelim', pEleDelim,
'pFactor', pFactor, 'pSuppressRules', pSuppressRules, 'pCumulate', pCumulate,
'pFactor', pFactor, 'pSuppressConsol', pSuppressConsol, 'pSuppressRules', pSuppressRules, 'pCumulate', pCumulate,
'pZeroTarget', pZeroTarget, 'pZeroSource', pZeroSource, 'pTemp', pTemp, 'pCubeLogging', pCubeLogging, 'pSandbox', pSandbox, 'pThreadMode', 1
);
ENDIF;
@@ -1193,7 +1200,7 @@ Else;
'pView', cViewSource,
'pFilter', sFilter,
'pSuppressZero', 1,
'pSuppressConsol', sSuppressConsol,
'pSuppressConsol', nSuppressConsol,
'pSuppressRules', pSuppressRules,
'pDimDelim', pDimDelim,
'pEleStartDelim', pEleStartDelim,
@@ -4,7 +4,7 @@
586,"}APQ Staging TempSource"
585,"}APQ Staging TempSource"
564,
565,"d47]aJqJl5FFYnIpD>38vzi=\>9NEz:TVv3L=>Mbs\KTPT`Y93`umL7Twnj1zMJb:2MF?5BIRzcGv8AY6`R4E8W0yr8fpiTyZ3Xxd6sbsZLCJIYw==xEPrzTK[>D3SLh:2xskPsEJ^R4Y4[FFi^V0Kt]A5BbC_iS>B[O=]B0UNhCFOYQ3oAI6Z<f6AS:MJc>f\>6:yFM"
565,"wMk]1KPR=P>BOR5PBx]mrp:adXmzy\CtwCC;Fx]LSa\r[8BqvH9MVQQo?kUq27Arf4O<s4G9vU1pzPkv?[fa=fU32_Uxd\<0]Dlm<NjOnum@hCROdNrXGEU3RgA<3czMpQXj=1iHv<b_cGQql\mM7aUbU<ZPkdjZSI:d9RjXY`lHvArZprdEuA@B[Vd5NdkBJXt6NLB`"
559,1
928,0
593,
@@ -787,7 +787,7 @@ cTimeStamp = TimSt( Now, '\Y\m\d\h\i\s' );
cRandomInt = NumberToString( INT( RAND( ) * 1000 ));
cMsgErrorLevel = 'ERROR';
cMsgErrorContent = 'User:%cUserName% Process:%cThisProcName% ErrorMsg:%sMessage%';
cLogInfo = 'Process:%cThisProcName% run with parameters pCube:%pCube%, pView:%pView%, pFilter:%pFilter%, pFilterParallel:%pFilterParallel%, pParallelThreads:%pParallelThreads%, pDimDelim:%pDimDelim%, pEleStartDelim:%pEleStartDelim%, pEleDelim:%pEleDelim%, pSuppressZero:%pSuppressZero%, pSuppressConsol:%pSuppressConsol%, pSuppressRules:%pSuppressRules%, pZeroSource:%pZeroSource%, pCubeLogging:%pCubeLogging%, pTemp:%pTemp%, pFilePath:%pFilePath%, pFileName:%pFileName%, pDelim:%pDelim%, pQuote:%pQuote%, pTitleRecord:%pTitleRecord%.';
cLogInfo = 'Process:%cThisProcName% run with parameters pCube:%pCube%, pView:%pView%, pFilter:%pFilter%, pFilterParallel:%pFilterParallel%, pParallelThreads:%pParallelThreads%, pDimDelim:%pDimDelim%, pEleStartDelim:%pEleStartDelim%, pEleDelim:%pEleDelim%, pSuppressZero:%pSuppressZero%, pSuppressConsol:%pSuppressConsol%, pSuppressRules:%pSuppressRules%, pZeroSource:%pZeroSource%, pCubeLogging:%pCubeLogging%, pTemp:%pTemp%, pFilePath:%pFilePath%, pFileName:%pFileName%, pDelim:%pDelim%, pQuote:%pQuote%, pTitleRecord:%pTitleRecord%, pSandbox:%pSandbox%';
cDefaultView = Expand( '%cThisProcName%_%cTimeStamp%_%cRandomInt%' );
cLenASCIICode = 3;

@@ -4,7 +4,7 @@
586,"C:\TM1\Bedrock\Data\Bedrock.Z.Cube.Placeholder.csv"
585,"C:\TM1\Bedrock\Data\Bedrock.Z.Cube.Placeholder.csv"
564,
565,"gRGDKxfaloAA>>:<[J2Cu:7eLk7=Q@qSlVJgTr<`6bwlU@HoGS[tYwRBsPY8469]Boj40bUZkCuDKcqnafBGhN;Wzi72vm:CJHvt3l\0^5b[Y<x?qpc54D2L5myVE88@CRgvmdpjQy3N]D5XLbBsEMkp?qDen@ExWCefnx;e8;G_?@r48KR7hkFe3uCeSSZvZ47gl]pR"
565,"pQvZc7GC:t;:o?RFa:hBCyaCA5cf8LS6gi>o3[_aG>PNPwxQV8I0E2PwO_VIzIfznYoYqjGf0@:Ua7Ycm5?c^Oc4@:e_?MJuzVZkOck3ILuQJQI>p2^h[]u3O4hxkOoFd03fEC`0VoX9CNbmSfOxo?=OD6Ooun;QO8C2vTz;[Dfx7>q7otRnB>9xvWn:v[tAiz5=Kp1r"
559,1
928,0
593,
@@ -320,7 +320,7 @@ cRandomInt = NumberToString( INT( RAND( ) * 1000 ));
cTempSub = cThisProcName |'_'| cTimeStamp |'_'| cRandomInt;
cMsgErrorLevel = 'ERROR';
cMsgErrorContent = 'User:%cUserName% Process:%cThisProcName% ErrorMsg:%sMessage%';
cLogInfo = 'Process:%cThisProcName% run with parameters pSrcDir:%pSrcDir%, pSrcFile:%pSrcFile%, pCube:%pCube%, pDim:%pDim%, pSrcEle:%pSrcEle%, pTgtEle:%pTgtEle%, pTitleRows:%pTitleRows%, pDelim:%pDelim%, pQuote:%pQuote%, pCumulate:%pCumulate%, pCubeLogging:%pCubeLogging%.' ;
cLogInfo = 'Process:%cThisProcName% run with parameters pSrcDir:%pSrcDir%, pSrcFile:%pSrcFile%, pCube:%pCube%, pDim:%pDim%, pSrcEle:%pSrcEle%, pTgtEle:%pTgtEle%, pTitleRows:%pTitleRows%, pDelim:%pDelim%, pQuote:%pQuote%, pCumulate:%pCumulate%, pCubeLogging:%pCubeLogging%, pSandbox:%pSandbox%';
cLenASCIICode = 3;

pDelimiter = TRIM(pDelim);

0 comments on commit 0bd4bbe

Please sign in to comment.
You can’t perform that action at this time.