View previous topic :: View next topic
|
Author |
Message |
per.idoff
New User
Joined: 05 Nov 2013 Posts: 2 Location: Sweden
|
|
|
|
Hi,
Syntax for overlay is: OVERLAY=(position:value)
e.g. OVERLAY=(45:C’NONE’) to put value NONE starting in position 45
Given symbol declaration:
Symbolname,45,10,CH
Is there any way to use a this symbol to position where to overlay?
Something like OVERLAY=(position(Symbolname):C'NONE') |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
per.idof,
As Akatsukami pointed out you just need to have a colon after the symbol and DFSORT would automatically treat that symbol as position.
Here is a sample. Check the sysout and see how the symbols are translated.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SYMNAMES DD *
POS-VARA,45,10,CH
CONSTANT1,C'NONE'
POS-VARB,*,10,CH
CONSTANT2,C'NEXT FIELD'
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(POS-VARA:CONSTANT1,POS-VARB:CONSTANT2)
//* |
|
|
Back to top |
|
|
per.idoff
New User
Joined: 05 Nov 2013 Posts: 2 Location: Sweden
|
|
|
|
Thanks! Works like a charm. |
|
Back to top |
|
|
|