Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to modify alignment of a IMS DC field dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: How to modify alignment of a IMS DC field dynamically
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Sep 22, 2011 3:16 pm    Post subject: Reply to: How to modify alignment of a IMS DC field dynamica
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Sep 22, 2011 4:02 pm    Post subject: Reply to: How to modify alignment of a IMS DC field dynamica
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us