Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How can I add fields which have thousand separator ?

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

New User


Joined: 30 Nov 2007
Posts: 15
Location: India

PostPosted: Wed Sep 17, 2008 10:33 am    Post subject: How can I add fields which have thousand separator ?
Reply with quote

Hi All.

My requirement is jcl to do like this:

input file : fb, lrec=80

2222 60.00
2222 250.00
3333 1,700.00
3333 500.00
7777 100.00

output file: fb, lrec=8

2222 310.00
3333 2,200.00
7777 100.00


If starting 4 bytes are same in input file we have to add next numeric field of 6 bytes having thousand separator and upto 2 point of decimal in the input file and write one record in output file.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Sep 17, 2008 8:53 pm    Post subject: Reply to: How can I add fields which have thousand separator
Reply with quote

comp_ashok,

You can use DFSORT UFF format to sum up the values. The following JCL will give you desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                 
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                           
2222 60.00                                 
2222 250.00                               
3333 1,700.00                             
3333 500.00                               
7777 100.00                               
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
  SORT FIELDS=COPY                         
  OUTFIL REMOVECC,NODETAIL,               
  SECTIONS=(1,4,                           
  TRAILER3=(1,4,X,                         
            TOT=(6,8,UFF,EDIT=(I,IIT.TT))))
/*                                         


Hope this helps...

Cheers
Back to top
View user's profile Send private message
comp_ashok

New User


Joined: 30 Nov 2007
Posts: 15
Location: India

PostPosted: Thu Sep 18, 2008 9:22 am    Post subject: Reply to: How can I add fields which have thousand separator
Reply with quote

Thanks Skolusu

yes, It worked fine. But, please tell me meaning of SECTION and TRAILER in the SYSIN card.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Sep 18, 2008 9:49 pm    Post subject:
Reply with quote

comp_ashok,

You might want to go through "z/OS DFSORT: Getting Started" It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.

www.ibm.com/systems/support/storage/software/sort/mvs/srtmpub.html
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us