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 change the format of a i/p field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to change the format of a i/p field
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: 3158
Location: Tucson AZ

PostPosted: Tue Jul 31, 2007 4:31 pm    Post subject:
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 Moderator


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

PostPosted: Tue Jul 31, 2007 8:18 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
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 Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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