pli conditon

IBM's cross-platform compiler PL/I for MVS, VM & VSE, OS/390 and Enterprise PL/I for z/OS

pli conditon

Postby surime72 » Thu Jun 21, 2012 5:23 pm

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**
display error message;
when(100) return;
if dp=' ' then
some if condition
else do;
else do;
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......
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: pli conditon

Postby prino » Thu Jun 21, 2012 7:54 pm

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
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: pli conditon

Postby Akatsukami » Thu Jun 21, 2012 8:46 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Global moderator
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: pli conditon

Postby dick scherrer » Thu Jun 21, 2012 10:17 pm


Suggest you indent when you write code - this makes it much easier to read.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to PL/I