How to sort an array in descending in RPG
Answer Posted / tahir
sorta is an array opcode to do the sorting ..
of records can used in all array type like-
1.run time
2.compile time
3.pre run time
and example of it can be.....
we use ipe specification for creating an array,there is a
parameter in ipe spec. SEQUENCE ENTRY ____________
write___A(ascending)
D(decending)
E arr1 1 4 2 0 arr2 3
C z-add 1 x 20
C do 12
C sortaarr1
C arr1,x dsply arr2,x
C add 1 x
C enddo
C seton lr
**
12dec
01jan
04apr
09sep
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
how do I declare a table or array in rpg iv?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
what do you mean by an input subfile, what are the keywords required?
What is a record lock error?
How to handle duplicate error handling in RPG?
Explain mdt?
how can I tell when to replace the array?
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400
How to declare the pull button in AS/400..
When it is desirable to describe files Internally?
What is the difference between copybooks and subprocedures in as400?
what is the necessary keyword needed to scroll subfile records?
is this a rpg channel?
can I touch the array during treatments?