View previous topic :: View next topic
|
Author |
Message |
ssprabhu
New User
Joined: 25 Apr 2005 Posts: 67 Location: pune
|
|
|
|
all, please tell me how to convert the 'alpha nuerics to 'XXXXXXXX' |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Based on the latest information you provided, you're not going to get any simpler than three INSPECT statements. |
|
Back to top |
|
|
ssprabhu
New User
Joined: 25 Apr 2005 Posts: 67 Location: pune
|
|
|
|
Yes robert , but there is no other way i have to 3 inispect stmt...
if any other way please advise me... |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
do this in one INSPECT
If input is
'HAI cust ac NO = 21212212,cNAME = sbi,cUST = 333'.
Code: |
inspect ws-name1 replacing
characters by "x" after initial "cust ac NO = " before
initial ",c"
characters by "x" after initial "cNAME = " before
initial ",cU"
characters by "x" after initial "CUST = "
|
but here you have to make sure the before clause changes for each replacing ...it should not be the same ...for No use before ',c' for name add one more letter to the before clause and do not forget to put a before clause for cUST or else the entire string till the max will be filled with "X"
so is cUST is the last in the data use before initial space [/code] |
|
Back to top |
|
|
ssprabhu
New User
Joined: 25 Apr 2005 Posts: 67 Location: pune
|
|
|
|
superb ashimeer..... |
|
Back to top |
|
|
ssprabhu
New User
Joined: 25 Apr 2005 Posts: 67 Location: pune
|
|
|
|
All,
please tell me how to convert the 'alpha nuerics to 'XXXXXXXX'
what is the synatx...please |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Alpha numeric will be treated as character .... what exactly do you want to convert ? |
|
Back to top |
|
|
ssprabhu
New User
Joined: 25 Apr 2005 Posts: 67 Location: pune
|
|
|
|
ok..ok...In case my date is like this PASSWORD = 12-34-21 .
so in this case i believe your above soln also do so ..am i rite ?
plz correct me if iam wrong... |
|
Back to top |
|
|
ssprabhu
New User
Joined: 25 Apr 2005 Posts: 67 Location: pune
|
|
|
|
Hai ,
Some times the text contains different naming conventions like
CUST ACCCOUNT NUMBER (or) CUST AC NO (OR) CUST NO.etc..
so is there any other way in one INSPECT command... like by using OR (or) AND type ...please let me know...
Many thanks in ADVANCE.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
instead of using literals in the INSPECT command syntax,
use variables
(personally, I would table everything),
and loop thru one (1) <there, you won your stupid bet>
INSPECT command,
modifying the variables before each invocation. |
|
Back to top |
|
|
|