× 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.



Hi Rishi,
I can't check your code with any RPG editor right now, but as far as I can
see there is an issue with the format of the content you are trying to
assign to the cmd variable.
When the content is a string that contains single apostrophes inside the
whole string mustn't be included in single apostrophes itself, because in
this way the first single one closes with the second one and all the rest
can't be parsed correctly.
I think you should use double apostrophes, like ", at the beginning and at
the end of the assignment, leaving the single apostrophe inside, or the
opposite, meaning single apostrophes at the beginning and at the end and
double apostrophes inside.
Would you give it a try?
Lucia

Il sab 2 nov 2019, 10:32 Rishi Seth <rishiseth99@xxxxxxxxx> ha scritto:

---------- Forwarded message ---------
From: Rishi Seth <rishiseth99@xxxxxxxxx>
Date: Sat, Nov 2, 2019 at 8:44 AM
Subject: SEU Editor error
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>


Hi,
while trying to code below program i am getting below error:-

FUNIX IF F 1000 SPECIAL PGMNAME('UNIXCMD')
F PLIST(UNIXPARM) USROPN
FQSYSPRT O F 132 PRINTER

D cmd s 5000a
D mode s 1A inz('P')

D record ds 1000
D outrec ds 132

C UNIXPARM PLIST
C PARM CMD
C PARM MODE
/free
cmd = 'echo 'u3VtNgfyWU9faZc3Iaa8ZWbE5UZCfmC17yA4MyW0ghflt9dNQ+
NDpCcgMZiG/kXPE4vv2CHL93B4iKiODHxxdVA=='+
| openssl enc -d -aes-128-ecb -K 363631653237354f494d31554+
c594c4a -nopad -nosalt -base64 -A -out string.txt';
read UNIX record;
dow not %eof(UNIX);
outrec = record;
write QSYSPRT outrec;
read UNIX record;
enddo;

close UNIX;
*inlr = *on;
/end-free

Error:- Additional Message Information



Message ID . . . . . . : RNF5377 Severity . . . . . . . : 20

Message type . . . . . : Diagnostic



Message . . . . : The end of the expression is expected.

Cause . . . . . : A token is encountered in the expression in the

Extended-Factor-2 entry, but none is expected. The remainder of the

expression is ignored. This diagnostic message may be issued due to an

omitted operator in the expression.

Recovery . . . : Omit all tokens at the end of the expression, or
insert a
valid operator. Compile again.














Bottom
Press Enter to continue.
--
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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.