Page 1 of 2

Change in PULL processing? Or a bug or...

PostPosted: Tue Oct 15, 2013 8:29 pm
by NicC
With this code...
'CLEAR'
Say "Enter year to calculate Easter for..."
Pull year
SAY '>'YEAR'<'


I get this...

 Enter year to calculate Easter for...
2014
 >                                         2014<

whereas I should get this...

Adding loads of periods after the 3 already there I get...

 Enter year to calculate Easter for...............................
2014
 >             2014<


so it looks as though the module reading my input is starting from the last character on the previous line (SAY), give or take a control character or 2, to the end of my actual input. Is this an "enhancement" or a fault in local installation. for those interested: after 'for...' there are 42 spaces/control chars and there are 41 spaces before '2014<'.

The bodge to get it working is to Strip the variable but that should not be necessary and was not at previous sites.

Thoughts?

Re: Change in PULL processing? Or a bug or...

PostPosted: Tue Oct 15, 2013 8:53 pm
by Akatsukami
CLEAR is, I presume, some local command or utility (on my system it seems to be a Session Manager CLIST). The result of executing your code (aside from the messages that tell me that Session Manager is not active) is as expected.

Perhaps the function of CLEAR cam be achieved in some other way?

Re: Change in PULL processing? Or a bug or...

PostPosted: Tue Oct 15, 2013 9:04 pm
by NicC
CLEAR is juSt a clear the screen command - where from I do not know. No session manager used - don't think that I have ever used it apart from one play in IBM UK.. Just on the off-chance that some hangover from it was the problem I commented it out - same result.
 000016 Then month = '03'
 Enter year to calculate Easter for...
2014
 >                                         2014<
 Good Friday  : 20140418


Just had another idea of what could be interfering - perhaps the 3270 emulator is doing it wrong - Hummingbird/Horizon?

Re: Change in PULL processing? Or a bug or...

PostPosted: Wed Oct 16, 2013 2:04 am
by Ed Goodman
I think the cursor is sitting at the end of the 'say' output.

Try putting in an extra SAY ""

This really reminds me of that old BASIC INPUT command. If you ended the prompt with a ';' then the cursor would stay up there, if not, you got a new line.

Re: Change in PULL processing? Or a bug or...

PostPosted: Wed Oct 16, 2013 3:16 am
by Pedro
I agree with you that the emulator is suspect. It works correctly on the PCOMM emulator.

Re: Change in PULL processing? Or a bug or...

PostPosted: Wed Oct 16, 2013 12:09 pm
by NicC
Thanks Pedro. That is the info I needed. I will try and get someone else to run it on a different machine to see if it is OK there and if it is then I will have to compare settings. If it isn't, I will have to report it to the powers that be.

Re: Change in PULL processing? Or a bug or...

PostPosted: Wed Oct 16, 2013 3:24 pm
by NicC
Seems like a problem in my setup as a colleague did not have the problem when he tried it. Pity I didn't think about this possibility before posting but it was whilst posting in response to Akatsukami's comments that I considered the emulator as I had to 'clean up' the cut and paste (it substituted commas for control bytes).

Now all I have to do is figure out which setting is wrong!

thanks all.

Re: Change in PULL processing? Or a bug or...

PostPosted: Thu Oct 17, 2013 3:08 am
by Mickeydusaor
Just add a period at the end of the Pull year .
'CLEAR'
Say "Enter year to calculate Easter for..."
Pull year .
SAY '>'YEAR'<'

Re: Change in PULL processing? Or a bug or...

PostPosted: Thu Oct 17, 2013 4:49 pm
by NicC
I do not see how adding a period at AFTER my variable name is going to remove LEADING blanks and putting it before does not rmove them either - it just swallows my input. Anyway, the problem was with the emulator mode being used. I am now not getting the leading spaces.

Re: Change in PULL processing? Or a bug or...

PostPosted: Thu Oct 17, 2013 7:04 pm
by Mickeydusaor
it does, why not try it and not say you do not see adding a period after, it does work and I use it all of the time. read the manual