In a map I defined an array as MYL'_' for the presentation and a control Variable cv(*)
Sometimes i put move (AD=p) to CV (6:10) for avoiding data Entry , and i want also that the filler character will presented as empty and not with the '_? character
Can i do it?
filler character
- RGZbrog
- Posts: 101
- Joined: Mon Nov 23, 2009 1:34 pm
- Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
- Referer: SAG Developer Forum
- Location: California, USA
- Contact:
Re: filler character
This was tested under Natural for Windows. You'll have to see how it fares on the mainframe.
If the field is empty, the CV is set to non-display (AD=N). Otherwise the filler is replace with non-displayable characters (H'00'). For display (ie to revert to underscores) the hex zeros are deleted.
This works for alpha fields; I haven't come up with a solution for numerics, yet.
Code: Select all
DEFINE DATA LOCAL
1 #A (A5) INIT <'ab'>
1 #B (A5)
1 #C (C)
1 #L (L) INIT <TRUE>
END-DEFINE
REPEAT
INPUT (AD=MDL'_')
'A:' #A (CV=#C)
// 'B:' #B
IF #L
THEN
RESET #L
IF #A = ' '
THEN
ASSIGN #C = (AD=PN)
ELSE
ASSIGN #C = (AD=P)
COMPRESS #A
H'0000000000'
INTO #A LEAVING NO SPACE
END-IF
ELSE
ASSIGN #L = TRUE
ASSIGN #C = (AD=D)
EXAMINE #A FOR H'00' DELETE
END-IF
END-REPEAT
END
If the field is empty, the CV is set to non-display (AD=N). Otherwise the filler is replace with non-displayable characters (H'00'). For display (ie to revert to underscores) the hex zeros are deleted.
This works for alpha fields; I haven't come up with a solution for numerics, yet.
Re: filler character
thank you , its work
-
- Similar Topics
- Replies
- Views
- Last post
-
- 4
- 1671
-
by Pedro
View the latest post
Sat Oct 30, 2021 6:48 am
-
- 6
- 2474
-
by sergeyken
View the latest post
Fri May 09, 2025 12:52 am
-
-
Retain non numeric character in IFTHEN - BUILD
by Shambu » Wed Dec 01, 2021 5:00 pm » in Syncsort/Synctool - 1
- 1958
-
by sergeyken
View the latest post
Sat Dec 04, 2021 2:28 pm
-