View previous topic :: View next topic
|
Author |
Message |
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi all,
I am having a scenario like this:
I am having a alphanumeric field PICX(7) in a table.I want to retrieve that value and needs to be written into the output file in the following format:
Code: |
If the value in table is like "8934 " it should be converted as "0008934"
If the value in table is like "EEE " it should be converted as " EEE"
If the value in table is like "X8795 " it should be converted as " X8795" |
Can any one tell me the logic to do this:The logic needs to be developed to handle for the above scenarios simultaneously.
Please help |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Siva,
The "values" you cite cannot be the true values of the pic x(7) field.
For example "EEE" could be any one of the following:
Code: |
' EEE ' 'EEE ' ' EEE ', etc. |
How can these values appear in the field. Can the "values" contain embedded spaces (e.g. "FF F")?
Your ans will dictate the solution(s). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
When you want to post data and retain the proportional spacing to show leading/trailing spaces, you can use the "Code" tag to do this (your original post has been "Code"ed).
Will the "input" always be left-justified in the field?
It appears that the non-numeric data is processed the same, so there are only 2 things to consider? |
|
Back to top |
|
|
|