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 reformat the fields to desired format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to reformat the fields to desired format
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 Moderator


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

PostPosted: Fri Oct 12, 2007 9:17 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Oct 15, 2007 10:42 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Mon Oct 15, 2007 1:07 pm    Post subject:
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 Moderator


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

PostPosted: Mon Oct 15, 2007 9:48 pm    Post subject:
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    Post subject:
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    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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
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 Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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