×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I'm trying to call an RPG program with a Data structure as a program
parameter, but the data doesn't come in formatted as I have defined
them.
When I debug the RPG, the 70 long datastructure isn't formatted as I
expected.
I have a table of data, which is weights, lengths and countries and
postcodes etc....
I want to pass it as an array of data structures so the RPG can deal
with it easily by mapping the datastructure.
I would have thought the first 27 characters would contain the first 3
lots of packed decimals.The next 3 and next 9 the two text fields, then
the last lot, 9, 11 and 11 representing the last 3 packed fields.
But, the packed decimal fields don't get put into the data structure
with the right lengths. The decimal fields are truncated, and corrupt
all the data.
Can you define an array of data structures in this way, and can you mix
text and decimals as I have tried to do?
// Data structure containing values for each line of data :
AS400DataType[] clioDS = new AS400DataType[]{
new AS400PackedDecimal(9,2),
new AS400PackedDecimal(9,3),
new AS400PackedDecimal(9,2),
new AS400Text(3),
new AS400Text(9),
new AS400PackedDecimal(9,2),
new AS400PackedDecimal(11,2),
new AS400PackedDecimal(11,2)
};
AS400Structure struc = new AS400Structure(clioDS);
Then later on, read through the array and extract the data.
C DO 99 X
C MOVE CLCH,X CLCHRG
C CLGRSW IFEQ *ZERO
C CLCUBE ANDEQ*ZERO
C CLFLAT ANDEQ*ZERO
C CLPOST ANDEQ*BLANKS
C CLCTRY ANDEQ*BLANKS
C LEAVE
C ENDIF
C Z-ADDX CLTAXW
C Z-ADDX CLPRCE
C Z-ADDX CLSURC
C MOVE CLCHRG CLCH,X
C ENDDO
Best regards,
Eric Lee
Four Soft UK Limited
Ground Floor
Gladstone House
Redvers Close
Lawnswood Business Park
Leeds
LS16 6QY
UK
DISCLAIMER:“The information in this email (and any attachments) is legally privileged and confidential. If you are not the intended recipient, you must not use or disseminate the information. If you have received this email in error, please immediately notify the sender by "Reply" command and permanently delete the original and any copies or printouts thereof. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Four Soft Limited or its subsidiaries or affiliates either jointly or severally for any loss or damage arising in any way from its use or incompleteness or any delay in its receipt".
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.