Page 1 of 1

pl1 program

PostPosted: Fri Nov 09, 2012 12:49 pm
by k srinivas
program for how to generate prime numbers between 1 to 100 in pl1?

Re: pl1 program

PostPosted: Fri Nov 09, 2012 3:20 pm
by enrico-sorichetti
where do You have problems...
the logic or the code ?

please remember, this is a help forum,
we will help, but will not do the work for You.

start by stages ...

a loop to print all the numbers fro 1 to 100
a loop to print all the even numbers
a loop to print all the odd numbers

once You have mastered the general PL/I (*) syntax and principal constructs
then You might start to worry about the primality test ...

the IBM manuals refer to it as PL/I not PL/1

You might also look here for the relevant PL/I manuals
http://www-03.ibm.com/systems/z/os/zos/ ... ppls2.html

Re: pl1 program

PostPosted: Fri Nov 09, 2012 8:10 pm
by Akatsukami
k srinivas wrote:program for how to generate prime numbers between 1 to 100 in pl1?

Assuming that you do not intent to purchase such a program(I would charge Rs. 40,000 for it), I would recommend implementing the sieve of Erastosthenes.

Re: pl1 program

PostPosted: Sat Nov 10, 2012 2:35 am
by NicC
From a PL/1 manual
Therefore, NPL was renamed to Programming Language One (PL/I).

therefor it can be written as PL/1 - and always has been (within IBM UK at least) just that 1 in some fonts can look the same as I.

Re: pl1 program

PostPosted: Sat Nov 10, 2012 3:13 am
by enrico-sorichetti
this is a cut and paste from the Enterprise PL/I bookshelf index

Shelf: Enterprise PL/I for z/OS and OS/390 V3R3

Find documents with titles, names, or doc numbers containing:


Document Title Name Date Document
Debug Tool for z/OS and OS/390 V3R1 Reference and Messages EQA3RM01 12/31/02 06:58:43 SC18-7172-01
Debug Tool for z/OS and OS/390 V3R1 User's Guide EQA3UG01 12/31/02 06:58:23 SC18-7171-01
Enterprise PL/I for z/OS and OS/390 V3R2 Diagnosis Guide IBM3DG01 09/18/02 08:51:14 GC27-1459-01
Enterprise PL/I for z/OS and OS/390 V3R3 Language Reference IBM3LR20 10/30/03 08:57:17 SC27-1460-03
Enterprise PL/I for z/OS and OS/390 V3R3 Messages and Codes IBM3MC20 10/29/03 17:33:39 SC27-1461-03
Enterprise PL/I for z/OS and OS/390 V3R3 Migration Guide IBM3MG20 10/30/03 08:49:01 GC27-1458-02
Enterprise PL/I for z/OS and OS/390 V3R3 Programming Guide IBM3PG20 10/30/03 09:07:10 SC27-1457-03
Total books = 7

Shelf Description:

Name = IBMSH320 Shelf Date = 08/02/04 09:07:12

Search Index = IBMSH320 Index Date = 04/26/05 10:40:50


Shelf Path = /home/webapps/zoslib/htdocs/bkshelf/IBMSH320.BKS
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.

Re: pl1 program

PostPosted: Sat Nov 10, 2012 3:32 am
by Akatsukami
Now, now: whether 'tis written "I", "1", or "δΈ€", the important thing is the ability to program in it...an ability that Srinivas-kun has yet to evince.

Re: pl1 program

PostPosted: Sat Nov 10, 2012 3:39 am
by enrico-sorichetti
I would suggest also looking here for some interesting PL/I resources and discussions

http://members.dodo.com.au/robin51/

Re: pl1 program

PostPosted: Sat Nov 10, 2012 4:41 am
by prino
enrico-sorichetti wrote:I would suggest also looking here for some interesting PL/I resources and discussions

http://members.dodo.com.au/robin51/

Please do not point anyone to this site that serves just one purpose, the promotion of Robin Vowels, someone who never makes any mistakes and is always right about everything PL/I, even if he is totally wrong. The guy is also the maintainer of the FAQ of comp.lang.pl1, a FAQ that has been splattered with dead links for the past few years.

If the TS really wants to see PL/I samples, Rosetta Code would be infinitesimally better.

Re: pl1 program

PostPosted: Sat Nov 10, 2012 4:53 am
by enrico-sorichetti
Thank You, Robert ,
I had forgot Rosetta stuff

I posted it because of the additional links provided.
( too lazy to cut and paste them myself and go thru the whole list to pick the good ones and the bad ones )