pl1 program



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

pl1 program

Postby k srinivas » Fri Nov 09, 2012 12:49 pm

program for how to generate prime numbers between 1 to 100 in pl1?
k srinivas
 
Posts: 1
Joined: Fri Nov 09, 2012 11:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: pl1 program

Postby enrico-sorichetti » Fri Nov 09, 2012 3:20 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: pl1 program

Postby Akatsukami » Fri Nov 09, 2012 8:10 pm

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.
"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
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: pl1 program

Postby NicC » Sat Nov 10, 2012 2:35 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: pl1 program

Postby enrico-sorichetti » Sat Nov 10, 2012 3:13 am

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.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: pl1 program

Postby Akatsukami » Sat Nov 10, 2012 3:32 am

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.
"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
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: pl1 program

Postby enrico-sorichetti » Sat Nov 10, 2012 3:39 am

I would suggest also looking here for some interesting PL/I resources and discussions

http://members.dodo.com.au/robin51/
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: pl1 program

Postby prino » Sat Nov 10, 2012 4:41 am

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

Re: pl1 program

Postby enrico-sorichetti » Sat Nov 10, 2012 4:53 am

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 )
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to PL/I

 


  • Related topics
    Replies
    Views
    Last post