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 Convert Edited Numeric to Numeric Format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Krishnamurthy

New User


Joined: 05 Nov 2006
Posts: 4

PostPosted: Tue Nov 07, 2006 6:36 am    Post subject: How To Convert Edited Numeric to Numeric Format
Reply with quote

Hi

I have an input file as follows

Code:

ACCT NO                              DATE                 AMOUNT
324167453                          11/04/2006           $6,603,039.84
125347918                          11/04/2006               $7,145.02-
820014986                          11/03/2006          $23,498,219.41


I want to Sum up the Amount field Based on the Date. The length of the
Amount field is 15 Bytes from Column 56 To 70 and the 70th Column is Signed Bit. It may be spaces or it may have a Minus Symbol, based the Value.

The Output file should be as follows

Code:

11/04/2006     6595894.82
11/03/2006    23498219.41


Please let me know how to do it using DFSort.

With Regards,
Krish
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 Nov 07, 2006 10:20 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for. I didn't know where you wanted the negative sign for the output records, so I assumed you wanted it before the number. If not, change the EDIT and SIGNS values as needed.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    SECTIONS=(36,10,
      TRAILER3=(36,10,
       15:TOT=(56,15,SFF,EDIT=(SIIIIIIIT.TT),SIGNS=(,-))))
/*
Back to top
View user's profile Send private message
Krishnamurthy

New User


Joined: 05 Nov 2006
Posts: 4

PostPosted: Tue Nov 07, 2006 11:08 pm    Post subject: Re: How To Convert Edited Numeric to Numeric Format
Reply with quote

Thanks a lot...It's working fine.

Regards,
Krish
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 How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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