IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to modify alignment of a IMS DC field dynamically


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sabthagiriraja

New User


Joined: 27 Apr 2009
Posts: 5
Location: Chennai

PostPosted: Thu Sep 22, 2011 2:34 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 22, 2011 2:38 pm
Reply with quote

with the justify-left-dynamic instruction
Back to top
View user's profile Send private message
sabthagiriraja

New User


Joined: 27 Apr 2009
Posts: 5
Location: Chennai

PostPosted: Thu Sep 22, 2011 2:54 pm
Reply with quote

Hi Dick Brenholtz,

It would be great if you could give me an example of justify-left-dynamic instruction.

Thanks,
Giri
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 22, 2011 3:01 pm
Reply with quote

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
View user's profile Send private message
sabthagiriraja

New User


Joined: 27 Apr 2009
Posts: 5
Location: Chennai

PostPosted: Thu Sep 22, 2011 3:11 pm
Reply with quote

icon_smile.gif . 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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Sep 22, 2011 3:16 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 22, 2011 3:22 pm
Reply with quote

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
View user's profile Send private message
sabthagiriraja

New User


Joined: 27 Apr 2009
Posts: 5
Location: Chennai

PostPosted: Thu Sep 22, 2011 3:34 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Sep 22, 2011 4:02 pm
Reply with quote

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
View user's profile Send private message
sabthagiriraja

New User


Joined: 27 Apr 2009
Posts: 5
Location: Chennai

PostPosted: Thu Sep 22, 2011 4:36 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top