Page 1 of 1

pli conditon

PostPosted: Thu Jun 21, 2012 5:23 pm
by surime72
hi i was new to pli
here my requirement is need to check the tble if it isfound need to display error message other wise need to continue prevuiosly what is going on here ,, example program....i was adding middle of the program
else if a=X then
if d¬=' 'then **sql query**
when(0)
display error message;
when(100) return;
if dp=' ' then
some if condition
else do;
'''''''
end;
else do;
..............
end;
else
if a= q then

       

here ELSE clause outside of an open IF-THEN statement is ignored
here my enhancement is if we select as a='X'
need to check table then 100 need to continue....
so please help me is there any other way to code the statements......

Re: pli conditon

PostPosted: Thu Jun 21, 2012 7:54 pm
by prino
surime72 wrote:hi i was new to pli

That's what happens if you bluff yourself into a job where you very obviously know nothing of the language.

Go get a PL/I manual and read it, better buy a second hand copy of Joan K. Hughes "PL/I Programming", Right now you don't know enough to ask the questons.

Edited for content

Re: pli conditon

PostPosted: Thu Jun 21, 2012 8:46 pm
by Akatsukami
Since you do not purport to include PL/I among your skills, surime72. I shan't be as harsh on you as Mr. Prins was. Nonetheless, your requirement is incomprehensible and your pseudo-code (I hope that that's not intended to be actual PL/I!) is execrable. Think things through, present your needs in as literate in English as is possible for you, and write some code that does not look like a backward child's first attempt.

Re: pli conditon

PostPosted: Thu Jun 21, 2012 10:17 pm
by dick scherrer
Hello,

Suggest you indent when you write code - this makes it much easier to read.