View previous topic :: View next topic
|
Author |
Message |
sabthagiriraja
New User
Joined: 27 Apr 2009 Posts: 5 Location: Chennai
|
|
|
|
Hi,
Can someone please help me on how to modify the alignment of a IMS DC field dynamically from PL1 program?
Currently the field alignment is Right justified. It should be changed to left justified dynamically from a PL1 program.
Thanks,
Giri |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
with the justify-left-dynamic instruction |
|
Back to top |
|
|
sabthagiriraja
New User
Joined: 27 Apr 2009 Posts: 5 Location: Chennai
|
|
|
|
Hi Dick Brenholtz,
It would be great if you could give me an example of justify-left-dynamic instruction.
Thanks,
Giri |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i was making fun of your use of the word dynamic.
it does not apply.
you want to know how to left justify a field, which is right justified, in PL/1.
it probably would help to know the field datatype. |
|
Back to top |
|
|
sabthagiriraja
New User
Joined: 27 Apr 2009 Posts: 5 Location: Chennai
|
|
|
|
. Yes i want to know how to left justify a field which is right justified.
It's a numeric field and the datatype is FIXED(5,2)
Thanks
Giri |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Knew that was going to be the answer...
What do you want to do with the zeros in front of the digits?
Edit: And why do you want this left-justified? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i am not a PL/1 person,
but,
what you are asking is nonsensical.
in any programming language, a numeric field is right justified
and zero filled to the left.
you can not remove those zeros in a numeric field without impacting the value of the field.
couple of questions:
for what use do you want a left justified numeric field?
is this for display on a report? or conversion to an x-type(alpha) field? |
|
Back to top |
|
|
sabthagiriraja
New User
Joined: 27 Apr 2009 Posts: 5 Location: Chennai
|
|
|
|
The purpose here is to display the value in IMS DC screen field as left justified.
My question here is how to change the alignment attribute of a IMS DC Screen field. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Nuts.
You want?
Code: |
999.99
99.99
9.99
.99 |
Unless you have a really specific user-requirement for this, it's going to drive the user nuts. When presented with data on a scree, people like to see things in the same place each time, not to have the distraction of trying to locate it. Even one or two characters out is really, really annoying.
Even if you have to do this, you'd do it to an edited field (with blanks replacing the leading zeros) which you'd then have to mess about with. |
|
Back to top |
|
|
sabthagiriraja
New User
Joined: 27 Apr 2009 Posts: 5 Location: Chennai
|
|
|
|
Yes, my user is nuts, he want the numeric field to be left aligned.
I found the solution. Thanks for yor time. |
|
Back to top |
|
|
|