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

How to change the format of a i/p field


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
adapalam

New User


Joined: 14 Mar 2007
Posts: 6
Location: hyderabad

PostPosted: Tue Jul 31, 2007 1:54 pm
Reply with quote

Suppose we have an input field which has a declaration as follows:
10 Field1 pic s9(5)v9(3) comp-3
and the position of this field is at 514...

Now if i want to put this field in the output file at 24th position and the format is s9(4)v9(2) comp-3
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jul 31, 2007 4:31 pm
Reply with quote

Have you looked at a sort manual?
Sorts offer a lot of function for reformatting your input, but you will be truncating the leading and trailing digits....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 31, 2007 8:18 pm
Reply with quote

adapalam,

You need to clarify what you want to do.

pic s9(5)v9(3) comp-3 is a 5-byte PD field and s9(4)v9(2) comp-3 is a 4-byte PD field.

You're starting out with a value like 12345.678 (X'012345678C') for input - what exactly is it you want for output? Do you want 2345.67 (X'0234567C') or something else? Note that the decimal point is not actually carried in the PD value.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top