Page 2 of 2

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 1:30 pm
by petercoloney
i'm beginner... and the code compiled and executed... with max = 0 but im not sure the output which i see is correct or not. guidance is needed.

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 1:35 pm
by BillyBoyo
petercoloney wrote:[...]
1.100000E+01            2.200000E+01            3.300000E+01   

[...]


The above are

11                   22                       33


Just in "scientific notation" 1.1 times ten to the power of one, 2.2 times ten to the power of one, 3.3 times ten to the power of one. Ten to the power of one is ten.

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 1:55 pm
by NicC
Why do you think that the output could be wrong? Do you think that the computer could have made a mistake?

If you were expecting 11,22 and 33 in plain 'English' then you need to convert your data from FLOAT BIN to PIC'9999' (however many 9s you need/want). You also, probably, had DATA CONVERSION WILL BE DONE BY SUBROUTINE CALL messages. Although this is OK, for performance you should read the data into PIC variables, move to FIXED (or FLOAT) DEC fields and then to FLOAT BIN. Reverse the process after your calculation to get displayable values. You did not need to go to FLOAT BIN - FIXED DEC would have been fine.

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 2:04 pm
by petercoloney
thanks BillyBoyo for helping in understanding the output: "Just in "scientific notation" 1.1 times ten to the power of one, 2.2 times ten to the power of one, 3.3 times ten to the power of one. Ten to the power of one is ten."

NicC: i didn't say the output was wrong.. i didn't understand the output and was not sure whether it was correct or not.

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 2:06 pm
by petercoloney
How i use get integer values displayed in output like 11,22,33. Also how can i accept character values from jcl and display it output.

Any help will be appreciated.

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 2:16 pm
by NicC
1) You inferred that that the output COULD be wrong and that is how I replied. Id id not say that said the output WAS wrong.
2) I have already explained how to get you numbers displayed - you may need to use picture edit characters if you want commas and decimal points etc. For character data simple GET to a CHAR variable and PUT from same. All this is in the manuals. We do not teach here - just try and help when things go wrong (hence my generalised comments).
3) Note that you do not 'accept character values from jcl' - you accept them from a dataset which the OS has generated from the JCL instructions that the OS received.

Re: Pl/1 Output ISSUE

PostPosted: Tue Dec 20, 2011 9:24 pm
by Akatsukami
petercoloney wrote:How i use get integer values displayed in output like 11,22,33. Also how can i accept character values from jcl and display it output.

Any help will be appreciated.

To expand on NicC's answer, read the fine manual on picture specification characters and on edit-directed format items.