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

How to reformat the fields to desired format


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

New User


Joined: 01 Jun 2005
Posts: 17
Location: USA

PostPosted: Fri Oct 12, 2007 4:48 pm
Reply with quote

Hello,

PIC clause of one of the fields has been changed from s9(4)comp-3 to s9(4)v9(4) comp-3.

Now I have to create new dataset from the old one with reformatted values.

How can I use DFSORT for this.

Thanks
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: Fri Oct 12, 2007 9:17 pm
Reply with quote

You haven't given enough information.

What is the starting position of the comp-3 variable?

Are you trying to convert the s9(4) comp-3 values to s9(4)v9(4) values, or are you trying to do something else?

s9(4) comp-3 is a 3-byte PD value without decimal places. s9(4)v9(4) is a 5-byte value with 4 decimal places. So you're increasing the size of the field and also changing its format. If the input value was -1234, what would the output value be?

What is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
angt

New User


Joined: 01 Jun 2005
Posts: 17
Location: USA

PostPosted: Mon Oct 15, 2007 9:39 am
Reply with quote

starting position is 10.

FIeld size has been increased from s9(4) comp-3 to S9(4)v((4) comp-3.

Now I have to transform my current dataset to new layout. Where I need to change the size of this field. Format will remain same. it was PD and it will remain PD.

If the input value is -1234 I want output to be -1234.0000

input Dataset is FB, and LRECL is 80. Output will also be same as i will adjust the increased lenth of field against the filler at the end of the layout.

thanks in advance
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Oct 15, 2007 10:42 am
Reply with quote

Hi angt,

Second post from you gives a fair explanation of your problem. However, I thinnk, best way to explain your problem would be.. show the Input file & expected output file. (Please enclose the "data" of files in 'Code' tag.)
e.g.:
Input
Code:
This is input data

Output:
Code:
This is output expected


Hope this will help you to get better answers.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Oct 15, 2007 1:07 pm
Reply with quote

Just increase the PD field length and multiply the value by 10,000 as you rebuild the record.
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: Mon Oct 15, 2007 9:48 pm
Reply with quote

angt,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,9,
    10:10,3,PD,MUL,+10000,TO=PD,LENGTH=5,
    15:13,66)
/*
Back to top
View user's profile Send private message
angt

New User


Joined: 01 Jun 2005
Posts: 17
Location: USA

PostPosted: Tue Oct 16, 2007 10:40 am
Reply with quote

Thanks Frank,

It worked
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 Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
Search our Forums:

Back to Top