MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

formatting characters

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Fri Jun 17, 2005 5:44 am    Post subject: formatting characters Reply with quote

Hi all,

Following is my input file:

Code:

F1             F2   F3    F4         F5   
------------- ---  ---   ---   --------   
AAAAAAAAAA    99   111   222   20030405   
BBBBBBBBBB    99   222     0   20030405   
CCCCCCCCC     98   333     0   20030405   
DDDDDDDDD     96  -999   366   20040110   
EEEEEEEEEEE   94   444  -999   20031010   


This file basically contains all character values. Each field is separated by spaces.

Now coming to the requirement:

Have to convert fields 3 and 4, which have the format X(4) to
S9(5) COMP-3 values.

When i move the char value to a Numeric value, am getting the following output
Code:

F1             F2   F3    F4         F5
------------- ---  ---   ---   --------
AAAAAAAAAA    99  1110   2220  20030405
BBBBBBBBBB    99  2220      0  20030405
CCCCCCCCC     98  3330      0  20030405
DDDDDDDDD     96  -999   3660  20040110
EEEEEEEEEEE   94  4440   -999  20031010
 


Output:
Code:

X(4)       TO S9(5) COMP-3.

111_      TO 1110  (the trailing space is being converted to a zero).
222_      TO 2220  and so on.

Help needed!!!

regards,
avid_lrner.


[/code][/list]
Back to top
View user's profile Send private message
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Fri Jun 17, 2005 5:58 am    Post subject: formatting characters Reply with quote

Sorry for the awful indentation.

posted the query in a hurry.

regards,
avid_lrner.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Jun 17, 2005 8:20 am    Post subject: Reply with quote

avid_lrner,

Please search before posting. A simple search for "COMP3" in Application programming would have given you the following topics which discusses similar issues.

http://www.mvsforums.com/helpboards/viewtopic.php?t=3540&highlight=comp3

http://www.mvsforums.com/helpboards/viewtopic.php?t=3117&highlight=comp3

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group