IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort an array using PL/1 Program


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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: 792
Location: Chennai, India

PostPosted: Mon Mar 31, 2008 6:16 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top