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
What is file identifier where we can use?
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.
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
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
what was the robotech rpg?
what is the difference between do while and do until?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
How can we know running job is batch or interactive?
How many program bind in one module....
what is an online rpg?
how does the rpg element work?
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...........
can I touch the array during treatments?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.