|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
hercules ascii to ebcdic translation error?I've tried to compile a pli program on tk3
that uses the string concatenation operator || unfortunately the | seems to be translated to the wrong character, pli complains of an illegal character and replaces it with a blank. the program was in an ascii file and transmitted to the network reader with ./sub filename in the turnkey jcl directory. |
|
|
Re: hercules ascii to ebcdic translation error?Richard S wrote: > I've tried to compile a pli program on tk3 > that uses the string concatenation operator || > I assume that is an un-broken bar... > unfortunately the | seems to be translated to the wrong > character, pli complains of an illegal character and > replaces it with a blank. > What "wrong" for PL1 may be "right" for other uses. IMHE there is no such thing as "the correct translation table". Because 3277 terminals didn't have "[]" as needed for "B" and "C" were often created by hi-jacking "|" and "cent". In order to make this work when using ASCII terminals the "|" was othen mapped to "[" which PL/1 doesn't understand. When I wrote X25 based code for VM mentioning the code points for "[" and "]" at any meeting involving users always produced a 10-20 minute "discussion" allowing me to have a quiet nap > the program was in an ascii file and transmitted to the > network reader with ./sub filename in the turnkey jcl directory. > > Check out the "CODEPAGE" configuration file entry:- http://www.hercules-390.org/hercconf.html#CODEPAGE and try some of the other codepages.... |
|
|
Re: hercules ascii to ebcdic translation error?--- In H390-MVS@..., "Richard S" <richard.snow@...> wrote: > > I've tried to compile a pli program on tk3 > that uses the string concatenation operator || > > unfortunately the | seems to be translated to the wrong > character, pli complains of an illegal character and > replaces it with a blank. > > the program was in an ascii file and transmitted to the > network reader with ./sub filename in the turnkey jcl directory. > Ahh, yes, that famous | operator. It's one of two EBCDIC characters with no ASCII equivalent. The other being the "NOT" operator, which my current US keyboard lacks. I haven't written a PLI program in 39 years but the PLI Programmer's Guide may indicate a symbol substitution. Good luck |
|
|
Re: hercules ascii to ebcdic translation error?--- In H390-MVS@..., Dave Wade <g4ugm@...> wrote: > > > > Richard S wrote: > > I've tried to compile a pli program on tk3 > > that uses the string concatenation operator || > > > > I assume that is an un-broken bar... > > > unfortunately the | seems to be translated to the wrong > > character, pli complains of an illegal character and > > replaces it with a blank. > > > > What "wrong" for PL1 may be "right" for other uses. IMHE there is no > such thing as "the correct translation table". Because 3277 terminals > didn't have "[]" as needed for "B" and "C" were often created by > hi-jacking "|" and "cent". In order to make this work when using ASCII > terminals the "|" was othen mapped to "[" which PL/1 doesn't understand. > > When I wrote X25 based code for VM mentioning the code points for "[" > and "]" at any meeting involving users always produced a 10-20 minute > "discussion" allowing me to have a quiet nap > > > the program was in an ascii file and transmitted to the > > network reader with ./sub filename in the turnkey jcl directory. > > > > > Check out the "CODEPAGE" configuration file entry:- > > http://www.hercules-390.org/hercconf.html#CODEPAGE > and try some of the other codepages.... > Another way is to use the compiler OPTIONS feature. You can use the following compiler options in PL/I for MVS and VM: * (OR) to specify valid characters for the OR symbol * (NOT) to specify valid characters for the NOT symbol I can't remember if the mvs/360 compiler supported these.... |
|
|
Re: hercules ascii to ebcdic translation error?Richard,
I had problems with this one too. After a few hours of fun, I found this worked for me: Original Code TEST_DISCOUNT_CODE: PROCEDURE; IF (DEPT = 'P' & DISCOUNT_CODE < 1 | DISCOUNT_CODE > 6))| (DEPT ¬= 'P' & DISCOUNT_CODE ¬= 0) THEN DO; PUT SKIP LIST ('INVALID DISCOUNT CODE ('||DISCOUNT_CODE|| ') FOR DEPARMENT '||DEPT); ERROR_RECORD = YES; END; END TEST_DISCOUNT_CODE; Became TEST_DISCOUNT_CODE: PROCEDURE; IF (DEPT = 'P' & DISCOUNT_CODE < 1 × DISCOUNT_CODE > 6)× (DEPT ^= 'P' & DISCOUNT_CODE ^= 0) THEN DO; PUT SKIP LIST ('INVALID DISCOUNT CODE (' ×× DISCOUNT_CODE ×× ') FOR DEPARMENT ' ×× DEPT); ERROR_RECORD = YES; END; END TEST_DISCOUNT_CODE; I hope this helps. Regards Phil --- In H390-MVS@..., "Richard S" <richard.snow@...> wrote: > > I've tried to compile a pli program on tk3 > that uses the string concatenation operator || > > unfortunately the | seems to be translated to the wrong > character, pli complains of an illegal character and > replaces it with a blank. > > the program was in an ascii file and transmitted to the > network reader with ./sub filename in the turnkey jcl directory. > |
|
|
Re: hercules ascii to ebcdic translation error?--- In H390-MVS@..., "Richard S" <richard.snow@...> wrote:
> > I've tried to compile a pli program on tk3 > that uses the string concatenation operator || > > unfortunately the | seems to be translated to the wrong > character, pli complains of an illegal character and > replaces it with a blank. > > the program was in an ascii file and transmitted to the > network reader with ./sub filename in the turnkey jcl directory. Stick this in your Hercules config file: CODEPAGE 819/1047 or use Hercules/380 where that is the default. You might need to use devinit rather than sub though, I'm not sure. I think sub should be automatically fixed too. The square brackets others mentioned should already be correct. BFN. Paul. |
|
|
Re: hercules ascii to ebcdic translation error?--- In H390-MVS@..., "cbttape" <cbttape@...> wrote: > > > > --- In H390-MVS@..., "Richard S" <richard.snow@> wrote: > > > > I've tried to compile a pli program on tk3 > > that uses the string concatenation operator || > > > > unfortunately the | seems to be translated to the wrong > > character, pli complains of an illegal character and > > replaces it with a blank. > > > > the program was in an ascii file and transmitted to the > > network reader with ./sub filename in the turnkey jcl directory. > > > > Ahh, yes, that famous | operator. > It's one of two EBCDIC characters with no ASCII equivalent. The other > being the "NOT" operator, which my current US keyboard lacks. > > I haven't written a PLI program in 39 years but the PLI Programmer's > Guide may indicate a symbol substitution. > > Good luck > on output the printout for this character shows up as unknown ? in Kate editor. the not is easy, its shift-6 ^ some version of pli that I have a manual for hints at an OR compiler option to use a different character, but I'm not sure that is supported in the version we actually use on tk3. rss at any rate, I have went ahead and copied my code to a dataset and finished it up using rpf. http://mypals.info/files/plijob.txt is the output |
|
|
Re: hercules ascii to ebcdic translation error?--- In H390-MVS@..., "Richard S" <richard.snow@...> wrote:
> > in the x3270, typing the | on my keyboard gets the right character. That uses the translate table in x3270, which I believe is correct. > on output the printout for this character shows up as unknown ? > in Kate editor. That uses the default translate table in Hercules, which I know is incorrect, at least for the usage you and I and anyone else I know have. I'm not sure why Hercules's default is set up to cater for alien space bats, since I haven't seen any polls that suggest that they are a significant number of Hercules users. Reminds me of a conversation I had just yesterday, with someone saying that they were afraid of a haunted hotel they went to. I pointed out that they should be more afraid of dying in a car crash on the way to the hotel, given the road toll, rather than the odds of being killed by a ghost, which are statistically quite low. You may as well be scared of being hit by a falling alien space bat. Speaking of which. Why did the koala fall out of the tree? Because it was dead. Why did the second koala fall out of the tree? Because it was hit by a falling koala. Why did the third koala fall out of the tree? Because it thought it was a race to the bottom. BTW, if anyone replaces "koala" with "koala bear" in the retelling of that, I will personally send my army of ghosts, with alien space bats providing air cover, to alter the stats a bit to make cars look less dangerous (relatively, anyway). BFN. Paul. |
|
|
Re: hercules ascii to ebcdic translation error?--- In H390-MVS@..., "kerravon86" <kerravon86@...> wrote: > > --- In H390-MVS@..., "Richard S" <richard.snow@> wrote: > > > > I've tried to compile a pli program on tk3 > > that uses the string concatenation operator || > > > > unfortunately the | seems to be translated to the wrong > > character, pli complains of an illegal character and > > replaces it with a blank. > > > > the program was in an ascii file and transmitted to the > > network reader with ./sub filename in the turnkey jcl directory. > > Stick this in your Hercules config file: > > CODEPAGE 819/1047 Tried that, same results. My linux locale is I think utf-8 that may be a problem. I'll see if I can't change it to the iso-8859 instead > > or use Hercules/380 where that is the default. > > You might need to use devinit rather than sub > though, I'm not sure. I think sub should be > automatically fixed too. > > The square brackets others mentioned should > already be correct. > > BFN. Paul. > |
|
|
Re: hercules ascii to ebcdic translation error?my bad -- I misread the .xstartmvs file and was updating the wrong herc.conf file. after fixing my locale to en_us.ISO-8859-1 and fixing the correct hercules config, I get the following output for a simple program to test this: http://mypals.info/files/plicodepage.txt Thanks much Richard |
| Free embeddable forum powered by Nabble | Forum Help |