I'm trying to call a subroutine for each value of an I-Descriptor, but
without much luck. The subroutine looks like:
SUBROUTINE D.CURRDELITEM (RetValue, passValue)
COMMON /CURRDELITEM_variables/ ARTLEDGER.FV
InvId = TRIM(passValue)
RetValue = ''
IF NOT(ASSIGNED(ARTLEDGER.FV)) THEN
OPEN '', 'ARTLEDGER' TO ARTLEDGER.FV ELSE RETURN
END
READ TrInvRec FROM ARTLEDGER.FV, InvId THEN
RetValue = 1
END ELSE
* RetValue = '0'
RetValue = OCONV(InvId, 'MX')
END
RETURN
END
I have a file with multiple invoice#s in field# 35 (INVS):
035 77]79]81]82]84]85]86]87]89
The key is "790*4/1". An I-Descriptor named CURRDEL looks like:
002 CATS(REUSE(@ID:'*'), @RECORD<35>)
gives me:
LIST ARTMASTER "790*4/1" INVS CURRDEL 06:03:34pm 12 Dec 2005 PAGE 1
ARTMASTER... INVOICES DEL............
790*4/1 77 790*4/1*77
79 790*4/1*79
81 790*4/1*81
82 790*4/1*82
84 790*4/1*84
85 790*4/1*85
86 790*4/1*86
87 790*4/1*87
89 790*4/1*89
1 records listed.
However, I want each key in the "DEL..." column to be passed to a program
named "D.CURRDELITEM", and all I get is:
002 SUBR("D.CURRDELITEM", CATS(REUSE(@ID:'*'), @RECORD<35>))
LIST ARTMASTER "790*4/1" INVS CURRDEL 06:52:25pm 12 Dec 2005 PAGE 1
ARTMASTER... INVOICES DEL............
790*4/1 77 3739302A342F312
A3737FD3739302A
342F312A3739FD3
739302A342F312A
3831FD3739302A3
42F312A3832FD37
39302A342F312A3
834FD3739302A34
2F312A3835FD373
9302A342F312A38
36FD3739302A342
F312A3837FD3739
302A342F312A383
9
79
81
82
84
85
86
87
89
1 records listed.
It looks like the subroutine was only called once and the entire string of
invoice keys was passed in at one time. So, I know I haven't handled the
complete multi-value properly.
Can anyone help. Thanks in advance.
Bill
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/