Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort an array using PL/1 Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
Prabha
Warnings : 2

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Mon Mar 31, 2008 6:06 pm    Post subject: Sort an array using PL/1 Program
Reply with quote

Hi,

I need to sort an element with array size 3 using PL/1 program(Not in jCL)

Array is declared as

DCL 1 Arr(3),
2 DIS1 fixed(5),
2 DIS2 fixed(5)

Input is
DIS1 DIS2
100 20
80 10
120 20


O/p should be

Input is
DIS1 DIS2
80 10
100 20
120 20


Pls help.
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Mon Mar 31, 2008 6:16 pm    Post subject:
Reply with quote

Please write with your own logic,
possibly.., Bubble sort, Quick sort, etc...
Back to top
View user's profile Send private message
AMITESH
Currently Banned

New User


Joined: 28 Feb 2008
Posts: 3
Location: kolkata

PostPosted: Fri Apr 18, 2008 1:09 pm    Post subject:
Reply with quote

In this case sorting is very easy. you only take care of DIS1 .
If the size of array is 3(fixed) you can do it by if else loop otherwise try to sort it by bubble sort which is the easiest one.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help - DB2 Dynamic SQL Program e... NikhilGuptaGaya DB2 4 Sat Jun 23, 2018 1:58 pm
No new posts To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 5 Thu Jun 21, 2018 6:57 pm
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm
No new posts Cobol program till a given time or fo... ankita agarwal COBOL Programming 7 Fri May 18, 2018 2:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us