Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Right Justification Logc

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
siva102

New User


Joined: 28 Nov 2007
Posts: 64
Location: Chennai

PostPosted: Fri Oct 17, 2008 8:40 pm    Post subject: Right Justification Logc
Reply with quote

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

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Oct 17, 2008 8:51 pm    Post subject:
Reply with quote

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Oct 17, 2008 10:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Justification of a field spoorni COBOL Programming 9 Fri Jan 30, 2015 12:05 am
No new posts justification with edit mask? rss0213 DFSORT/ICETOOL 11 Sat Jul 28, 2012 7:33 pm
No new posts Using justification in SYNCTOOL raam_kumar JCL & VSAM 7 Fri Apr 27, 2007 2:10 pm
No new posts Justification of Alphanumeric variabl... rohit_raajin COBOL Programming 5 Thu Jan 04, 2007 3:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us