2 Replies Latest reply on Jan 10, 2019 9:17 AM by Ram Iyer

    Control_m variable resolution within string text?

    Ram Iyer
      Share:|

      Control_m variable resolution within string text?

      =================================================

       

      Thanks for looking into my issues. I am using Control_m 9.0 on Linux. I did review control help, but I did not find an answer, so I am posting here.

       

       

       

      I am using control_m local variables to resolve values as follows:

       

      In Smart Folder:

       

      %%INPUT_Value = 2018

       

      %%FLNG_YR_TXT =_CY0

       

      The text values after resolution:

       

      input_string_2018_CY0

       

      another_input_string_2018_CY0.sql

       

       

      Using the above variable, I have the following are specified in underlying sub folder:

       

      input_string_%%INPUT_Value.%%FLNG_YR_TXT  ===> It is resolving correctly

       

      another_input_string_%%INPUT_Value.%%FLNG_YR_TXT..%%sql ==> It is not resolving correctly. It throw CTMERR

       

      I did review variable expression spec of control_m help to work on this. I am not sure, why is not resolving correctly.

       

      I am thinking of implementing these variable resolutions for IN/OUT conditions.

       

       

      Where can I find more info for resolutions?

       

       

       

      Thanks for guidance.

        • 1. Re: Control_m variable resolution within string text?
          Marco Bellusci

          The CTMERR is on a specific place in your string. I would guess, the first two variables are fine, but what do you expect with the variable %%sql? I think this one throws the ctmerr. Try another_input_string_%%INPUT_Value.%%FLNG_YR_TXT..sql

           

          Regards

          Marco

          3 of 3 people found this helpful
          • 2. Re: Control_m variable resolution within string text?
            Ram Iyer

            Thanks for your reply. It worked.

             

            @Marco

            Here are similar issues, I am facing.

             

            I followed your thread https://communities.bmc.com/thread/153951?start=0&tstart=0http://

             

             

            about Control M variable definitions and tried the steps, but here are errors surprising me.

             

            Does treat contact for numeric and string(text) differently ?

             

            Expected result ==> input_fixed_string_FS19_CY0

             

            FS_NUM = 19 in Smart folder

             

            _CY0 is fixed text to be appended to result

             

            input_fixed_string_FS%%FS_NUM%%._CY0 resolved as input_fixed_string_FSCTMERRFS_NUMCTMERR._CY0

             

            input_Fixed_string_FS%%FS_NUM _CY0 resolved asinput_fixed_string_FS19

             

            input_fixed_string_FS%%FS_NUM %%MINUS 1 _CY0 resolved as Illegal

             

             

            input_fixed_string_FS%%FS_NUM %%MINUS 1  resolved as First

             

            input_fixed_string_%%FS_CY0%%._CY0 resolved as input_fixed_string_CTMERRFS_CY0CTMERR._CY0

             

            input_fixed_string_%%FS_CY0 resolved as input_fixed_string_FS19

             

            Looks like ._CY0 with string variable not resolving properly, but it is working, if result is numeric. How do I concat/append to string value (from Variable resolution)?

             

             

            How do I resolve this?

             

            Thanks for sharing.