|
I have an array with multiple fields. I need to sort the array on one field
(alot1).
Here is my array definition, load and print code.
I have tried using the SORTA on 'a lot', but get a Decimal data error.
D prtfields DS
D allfields 1 320 DIM(10)
D acoat1 3a overlay(allfields:*next)
D awgt 9s 3 overlay(allfields:*next)
D alot1 5s 0 overlay(allfields:*next)
D alot2 5s 0 overlay(allfields:*next)
D abarcod 10s 0 overlay(allfields:*next)
C* Build array.
C*
C add 1 x
C move coat1 acoat1(x)
C move wgt wgt(x)
C move lot1 alot1(x)
C move lot2 alot2(x)
C move barcod abarcod(x)
C* Print report
C X DOUEQ 0
C move abarcod(x) barcod
C move awgt(x) wgt
C move acoat1(x) coat1
C move alot1(x) lot1
C move alot2(x) lot2
C SUB 1 X
C EXCEPT DETAIL
C ENDDO
Any help would be appreciated.
William Moore
California Fine Wire
805-489-5144
wjmoore@xxxxxxxxxxxx
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.