Hi strausb
I am in Australia so only get this over night.
Change this to only do if RCD.U.Garment ID is entered. (otherwise it will do for every line and position on last line on screen) i.e. This never happens but causes the cursor code to be added to Source.
> USER: Initialize subfile record (new record)
.--
. ¦ *Set Cursor: RCD.U.Garment ID (*Override=*YES)
'--
The usersource should have 2 Paramaters
EDIT ACTION - FUNCTION DETAILS ALL PARAMETERS
Function file : Utilities Display Column 2
Function. . . : Set Cursor row /Column
Obj
IOB Parameter Use Typ Ctx Object Name
I Cursor Row FLD LCL Cursor Row
I Cursor Column FLD CON 2 ** This sets the Column to 2 where it probably needs to be
Definition of two fields.
EDIT FIELD DETAILS Australian Wool Handlers
Field name . . . . : Cursor Column Document'n seq. . :
Type . . . . . . . : REF Ref: NBR *Cursor column Field usage: USR
Internal length. . : 5 Data type : P GEN name: CSCL <---(This is important)
K'bd shift:
Headings. . . . . . :- Old DDS name:
Text . . . . . . . . : Cursor Column
Left hand side text. : Cursor Column
Right hand side text :
Column headings. . . : Cursor
Column
Control . . . . . . :-
Default condition : *NONE
*NONE
Modulus 10/11. . . . :
Edit codes. . . . . :- Mask input edit code (Y,' ')
Screen input . . . . : 4 ' '
Screen output. . . . : 3 ' 0'
Report . . . . . . . : 3 ' 0'
and
EDIT FIELD DETAILS Australian Wool Handlers
ield name . . . . : Cursor Row Document'n seq. . :
ype . . . . . . . : REF Ref: NBR *Cursor row Field usage: USR
nternal length. . : 5 Data type : P GEN name: CSRW (<-- This is important)
K'bd shift:
eadings. . . . . . :- Old DDS name:
Text . . . . . . . . : Cursor Row
Left hand side text. : Cursor Row
Right hand side text :
Column headings. . . : Cursor
Row
ontrol . . . . . . :-
Default condition : *NONE
*NONE
Modulus 10/11. . . . :
dit codes. . . . . :- Mask input edit code (Y,' ')
Screen input . . . . : 4 ' '
Screen output. . . . : 3 ' 0'
Report . . . . . . . : 3 ' 0'
The Rpg User Source
C Z-ADD#ICSRW W0ROW0 * Sets Row to input P
C Z-ADD#ICSCL W0COL0 * Sels Col to Input P
C MOVE '0' W0OVR0 * Allow override
The #I means use the value of input parameter worth reading manual on this
My code.
.-CASE
¦-RCD.EAN 13 Barcode test is Entered
¦ RCD.Text (15 chars) = CND.Processed
¦ LCL.Cursor Row = PGM.*Cursor row + CON.1
¦ Set Cursor Row/Column RPG - Utilities Display * Column 2
¦ PGM.*Defer confirm = CND.Defer confirm
'-ENDCASE
Note Cursor row not *Cursor Row and look at parameters of Set Cursor Row above.
This works a treat.