View previous topic :: View next topic
|
Author |
Message |
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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
Output:
Code: |
This is output expected |
Hope this will help you to get better answers. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Just increase the PD field length and multiply the value by 10,000 as you rebuild the record. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
angt
New User
Joined: 01 Jun 2005 Posts: 17 Location: USA
|
|
|
|
Thanks Frank,
It worked |
|
Back to top |
|
|
|