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 to get the count in output

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

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Mon Mar 17, 2008 7:58 pm    Post subject: How to get the count in output
Reply with quote

Hi,

Iam having a FB LRECL=80 file with records as follows

first 1 to 10 digits has account number zoned decimal (can have duplicates).
64th position will have a flag A or P.

I want to have the number of records of the same accounts with A as well as P in the output.
Is that possible to get it done using sort?

Eg:

0012345678 A
0012345678 P
0012345678 P
0012345678 P
0012345679 A
0012345679 A
0012345679 P
0012345679 P

Output File:
0012345678 A 1
0012345678 P 3
0012345679 A 2
0012345679 P 2

Thanks much for your time.

Regards
Tanden
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 Mar 17, 2008 8:54 pm    Post subject:
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
0012345678 A
0012345678 P
0012345678 P
0012345678 P
0012345679 A
0012345679 A
0012345679 P
0012345679 P
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  SORT FIELDS=(1,12,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    SECTIONS=(1,12,
      TRAILER3=(1,12,X,COUNT=(EDIT=(IIT))))
/*
Back to top
View user's profile Send private message
notonly4u

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Mon Mar 17, 2008 9:50 pm    Post subject: Reply to: How to get the count in output
Reply with quote

Hi Frank,

Thank you verymuch for your kind response.

Regards
Tanden
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 write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

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