Topic
4 replies Latest Post - ‏2013-05-03T15:37:48Z by george.baker
george.baker
george.baker
286 Posts
ACCEPTED ANSWER

Pinned topic Prompt parameters

‏2013-04-30T12:49:58Z |

I'm working with HATS as a Web service.

The <prompt> action has a len parameter to indicate the length of the data.  The VME sets this value to what appears to be the width of the screen, normally 80, for every prompt even though when I select the area of the screen in which to insert the prompt is virtually less than the maximum, example 8 characters.  I can change that value to what the field length is and when I create the Integration object I can see that the length is properly set in the Object code.  However, when the service (WSDL) is created there is no specification present for the length of the field.

First, is this working as designed?

Second, how does this length parameter work?  for example if the prompt specifies a length of 10 and the user provides a string of 15, what is entered into the presentation space?

  • tmparker
    tmparker
    484 Posts
    ACCEPTED ANSWER

    Re: Prompt parameters

    ‏2013-05-01T17:35:17Z  in response to george.baker

    Hi George,

    Prompt lengths are based on the field that the prompt is specified for.  When you create the prompt while recording the macro it will add a length parameter based on the field size.  The VME doesn't work the same as you noticed and, as far as I can tell, this is due to the fact that you are manually inserting a prompt and there is no code that can tell what field it is being placed in so no length can be determined.  I don't really know if this is a bug or working as designed.  When it comes to a web project, the length value will be used to control the input field length which is how we control how much data can be entered.  As for using it as a web service, my guess is we would simply trim the string to the max length of the field before we enter it on the host if the data sent was too long.  That would have to be tested to verify.  If the length parameter is causing you an issue in the VME you can open a PMR and explain what is happening and someone can look into it to determine if it can be done better.

    Thanks

    Tim

    • george.baker
      george.baker
      286 Posts
      ACCEPTED ANSWER

      Re: Prompt parameters

      ‏2013-05-01T23:04:27Z  in response to tmparker

      Thanks for the prompt reply.  All of what you said makes sense.  Tomorrow I will do some experimentation with this so see what happens on the exceptions.  I'll update this post with results.

  • george.baker
    george.baker
    286 Posts
    ACCEPTED ANSWER

    Re: Prompt parameters

    ‏2013-05-02T20:10:29Z  in response to george.baker

    I ran an experiment with a signon macro.  

    1. I recorded and tested a macro
    2. I changed the len="10" to len="8"
    3. I tested the macro in the VME.  I specified a user ID of 10 characters.  All ten characters were passed to the host
    4.  I then created a RESTful Web service from the macro and ran the same test to the service and I had the same result.

    Conclusion, the len parameter is ignored in the macro.  The IO has the length of 8, so IMHO the IO should be truncating the value to the value specified in len.

  • george.baker
    george.baker
    286 Posts
    ACCEPTED ANSWER

    Re: Prompt parameters

    ‏2013-05-03T15:37:48Z  in response to george.baker

    I decided to test the theory the remainder of Tim's response related to a web project.  

    • I first rerecorded the macro via the Host Terminal and confirmed that the length of the field for the <prompt> was properly set in the macro.  But, I found that if you then use the VME to view the Prompt and exit the wizard without changing anything by clicking OK (which actually saves it), the value is reset to 80.  I also did a test by changing the screen size to 27x132 and the length was still set to 80.
    • I next reset len="10" manually and saved the macro.
    • I built a Web page for the SignOn screen that only provided a button to run the Logon macro.  I ran the the project and clicked the button
      • I was prompted for the user ID and the password
      • I was able to enter what appeared to be an unlimited number of characters in each field.  I stopped at 90 characters.  The input was not limited to 10 characters.
      • When the macro ran all 90 characters were input onto the screen.

    My results indicate that this length field is not honored or used in any fashion in HATS.