|
CALL PGM(RISHI/RP6)Buffer length not valid.
The error messages are pretty descriptive of the problem. There is no
definition for field LEN.
Perhaps you are making the mistake of thinking that defining LEN in a
prototype defines it? It doesn't - prototypes do not define fields - they
specify the requirements for a parameter.
All errors devolve from that single error. Including the message about a
missing prototype.
On Nov 26, 2019, at 11:28 AM, Rishi Seth <rishiseth99@xxxxxxxxx> wrote:and
Hi,
I tried to write RPGLE program so that i could directly first convert key
field value from file K1 to ASCII and then ASCII to HEX using QDCXLATE
CVTHC APIs respectively but now the program itself is not gettingcompiled.
eventhough fasterways are available using online links but to achieve theseems
same functionality in AS400 program i was trying it.
please find the below link where i tried to read the file k1's field KEY
and then tried to assign it's hex value to my openssl command but it
program itself is not getting compiled.'Jon
*https://code.midrange.com/033903213b.html
<https://code.midrange.com/033903213b.html>*
Thanks
On Tue, Nov 26, 2019 at 4:44 PM Raul Jager <raul@xxxxxxxxxx> wrote:
To get the same value you will need to convert your data to ascii before
converting to hex.
Store directly the hex in a char field and avoid all problems. The
previously converted field will use twice the space, but save you a lot
of trouble.
El 2019-11-26 a las 07:35, Rishi Seth escribió:
Ok,thanks but program shown in this link is converting hex value
incorrectly if i compare it from
website link from below:
*https://www.rapidtables.com/convert/number/ascii-to-hex.html
<https://www.rapidtables.com/convert/number/ascii-to-hex.html>*
Hex value from program:-HEXEQUIVALENT =
'D196954081958440E2A4A28195406040D78199A3958599F4F0F0'
TESTSTRING = 'Jon and Susan - Partner400'
but HEX value as per below link is different for same text string ('
tooand Susan - Partner400' ).6e
*https://www.rapidtables.com/convert/number/ascii-to-hex.html
<https://www.rapidtables.com/convert/number/ascii-to-hex.html>*
hex value :-4a 6f 6e 20 61 6e 64 20 53 75 73 61 6e 20 2d 20 50 61 72 74
65 72 34 30 30hold
I tried below link but it's not working showing same error :-
Message ID . . . . . . : RNQ0103 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 19-11-26 Time sent . . . . . . :
11:18:22
Message . . . . : The target for a numeric operation is too small to
123
the result (C G D F).
Cause . . . . . : RPG procedure RP4 in program RISHI/RP4 at statement
performed an arithmetic operation which resulted in a value that is
:maintenance
large to fit in the target. If this is a numeric expression, the
overflow
could be the result of the calculation of some intermediate result.
Recovery . . . : Contact the person responsible for program
to
determine the cause of the problem.
Possible choices for replying to message . . . . . . . . . . . . . . .
is
D -- Obtain RPG formatted dump.
S -- Obtain system dump.
F -- Obtain full formatted dump.
More...
***********
Ideally HEX Value of the key(661e275OIM1ULYLJ) used here
is 363631653237354f494d31554c594c4a but program advised to use HEXAPI
frank.kolmann@xxxxxxxxx>giving wrong HEX value it's
giving value in debug mode like this :-HEXEQUIVALENT =
'F6F6F185F2F7F5D6C9D4F1E4D3E8D3D1 '
So that might be the reason my program is failing and giving above
mentioned error.
Thanks
On Tue, Nov 26, 2019 at 11:20 AM Frank Kolmann <
postedwrote:
Hi
You could roll your own convert to hex routine.
A long time ago I coded a hex converter in RPG III.
This following is a port to RPG ILE
I havent run this code snippet I copied it from another program I
affiliatetoin the wiki.
But the general idea is to calculate the index to the hex character in
the CRS array by turning low order bits off then high order bits off.
It converts the 1 byte FLD to hex in the string RU.
D DS
D BIN 1 2B 0
D HX1 2 2
D HX2 1 2
D RU S 255 varying
D FLD S 1
D X0F C X'0F'
D XF0 C X'F0'
D Z S 5 0
D CRS S 1 DIM(16) CTDATA PERRCD(16)
BIN = 0;
HX1 = FLD;
HX1 = %BITAND(HX1 : XF0);
Z = BIN / 16 + 1;
RU = RU + CRS(Z);
BIN = 0;
HX1 = FLD;
HX1 = %BITAND(HX1 : X0F);
Z = BIN + 1;
RU = RU + CRS(Z);
**
0123456789ABCDEF
Regards
Frank
On 26/11/2019 8:24 am, Rishi Seth wrote:
Hi,program
Just realized i had put + sign incorrectly at this statement in my
which i shared in previous email link.
1. callp ToHex(HexEquivalent:+
2. KEY: %len(KEY)*2);
after removing it though it got compiled successfully but when trying
run giving error-- snip
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
questions.--link: https://amazon.midrange.com
-- Este e-mail fue enviado desde el Mail Server del diario ABC Color --
-- Verificado por Anti-Virus Corporativo Symantec --
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
link: https://amazon.midrange.com
Help support midrange.com by shopping at amazon.com with our affiliate
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
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.