can anybody tell me how you are doing string replacement in mainframe job?
for example....if a password column had six characters .....i need to replace it with 6 '*'s .
Thanks in advance.
string replacement in mainframe job
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 315
- Joined: Tue Oct 31, 2006 3:38 pm
Thats right we dont. We only have MVS job type. Sorry, my bad.
If its a px job then there are certain ways this can be done.
For instance if your column is of type varchar, do
It will not fit the date format and hence give you stars. If the field can have less character then the length specified, you can do a substring of it using
If its a px job then there are certain ways this can be done.
For instance if your column is of type varchar, do
Code: Select all
StringToDate(in.PWD)
Code: Select all
StringToDate(in.PWD)[1,LEN(in.PWD)]
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's a mainframe job. Unfortunately there is no function such as the one you seek in mainframe jobs. You have Len() to determine the length, and I think - without checking - that you have Str() which can generate repeated strings. So something like Str("*",Len(MyString)) might do it for you.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is no STR function, alas.
Certainly you could do something like RPAD('', 6, '*') to generate six asterisk characters.
But I don't think the second argument can be an expression. That is, you could not use RPAD('', (CHARACTER_LENGTH(InLink.ColName)), '*')
Maybe that will give you some ideas, however.
Certainly you could do something like RPAD('', 6, '*') to generate six asterisk characters.
But I don't think the second argument can be an expression. That is, you could not use RPAD('', (CHARACTER_LENGTH(InLink.ColName)), '*')
Maybe that will give you some ideas, however.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.