RE: looper is not returning proper iteration values where there is a parameter change is done
The total number of times the loop needs repeated, is computed on the fly and assigned as LP_LOOP_COUNT var in LOOP_TEST. When we make LP_LOOP_COUNT a Job Flow parameter, we need to prepend the ‘$FL_’ to the var name to use it in LOOP_TEST. However, the value assigned to LP_LOOP_COUNT at the beginning of JF execution, seems to be unchangable on the fly. Attached are Job Flows (EXTRACT_6 & EXTRACT_7) illustrating this prob.
- EXTRACT_6 has LP_LOOP_COUNT = 25 and executes successfully
- EXTRACT_7 has LP_LOOP_COUNT = 25 initially, but has a different value assigned at the beginning of LOOP_TEST. However, the new value is not working. Creating a new variable (not a Job Flow parameter but a local var in LOOP_TEST step) is not working either.
Below is the looper script/command we have used in the Looper start
$$LOOP_COUNT = ( $RT_WEB_SERVICES_GETPAGES_ORG_COUNT / 100 ) + 1
for i in `seq 1 $$LOOP_COUNT`;
change your script command and the below command working as expected. You can replace the FL_PARAM_COUNT with webservice job parameter.
## save $START, just in case if we need it later ##
while [[ $i -le $END ]]
((i = i + 1))