"Piotr Szczurek" <cwpisz@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
02/10/2009 01:45 PM
Please respond to
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
To
rpg400-l@xxxxxxxxxxxx
cc
Subject
How to pass mixed data structure from the command line
Hello.
I have such situation: there are commands stored in the table.
I retrieve them and must execute with QCMDEXC.
These commands includes some variable names, which I should replace with
proper values. And generally there is no problem - I wrote a routine
which
replaces it; recently I received command:
CALL PGM(IVHHDRO3) PARM('' &COMC&INVO&DATE)
As you can see there is one parameter (data structure) combined from 3
variables.
This input data strucure is like this:
D parmstruct ds
D comc 3A
D invo 9P 0
D date 7P 0
How can I run this program with QCMDEXC or from the command line? Would
you
give me an example for:
comc = '120'
invo = 100000001
date = 1090210
If these 3 variables are splited, then command would be like this: CALL
PGM(IVHHDRO3) PARM('' '120' X'100000001F' X'1090210F') but what if the
are passed as a data structure? CALL PGM(IVHHDRO3) PARM(''
'120'X'100000001F'X'1090210F') is not working ;)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.