|
I think we are getting diverted from main topic what i meant was thateven
i tried as you said on fly that flat file should be created with exactlength
length of that decrypted value even that i tried please see below code
but n1 variable which is holding the value of %len(outrec) in debug mode
tells it's value to be 64 that means still after doing those %trimr on
field or data structure as well have some extra junk value because
of decrypted value is 48 only so 64-48 =16 these 16 length is full of
garbage which i don't want to write in my flat file .
XML-INTO encodedExchangeToken %XML('/home/I0RS01HU/+
INPUT.xml':'doc=file case=any path=+
TokenExchangeResponse/encodedExchangeToken');
eval encodedExchangeToken =%trimr(encodedExchangeToken);
cmd = 'echo ' + '''' + encodedExchangeToken + ''' ! openssl +
enc -d -aes-128-ecb -K 363631653237354f494d31554c594c4a +
-nopad -nosalt -base64 -A';
open UNIX;
read UNIX record;
dow not %eof(UNIX);
eval record = %trimr(record);
eval outrec = %trimr(record);
eval outrec = %trimr(outrec);
EVAL N1 = %LEN(OUTREC);
DSPLY N1;
//Delete the TESTFILE
Åcommand = 'DLTF FILE(rishi/TESTFILE)';
QCMDEXC(%trim(Åcommand): %len(%trim(Åcommand)));
Åcommand = *blanks;
Åcommand = 'CRTPF FILE(RISHI/TESTFILE) RCDLEN(500)';
QCMDEXC(%trim(Åcommand): %len(%trim(Åcommand)));
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.