Posted: Thu Oct 30, 2008 3:35 am Post subject: Count number of records from specific group of records
Hi,
I have requriment in which i need to count number of records from set of batch numbers like i need to know how many trasactions are there for 917474 , 571144 , 571145 .
And display them like
No of trasactions for 917474 : 5
No of trasactions for 571144 : 7
No of trasactions for 571145 : 4
BATCH TYPE NUMBER
917474 CLOSE 62200202992
917474 WRITE 62200202992
917474 WRITE 62200202992
917474 WRITE 62200202992
917474 WRITE 62200202992
571144 CLOSE 221032906994
571144 WRITE 221032906994
571144 WRITE 221032906994
571144 WRITE 221032906994
571144 CLOSE 221032906994
571144 WRITE 221032906994
571144 WRITE 221032906994
571145 CLOSE 221032906995
571145 WRITE 221032906995
571145 WRITE 221032906995
571145 WRITE 221032906995
The above code is working fine for numberic values . what if we have values like this 003E5968,002A1290( i.e. alpha numberic) values under batch number.What should be for this (1,6,ZD,E'999999') in case of alpha numberic values.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Oct 30, 2008 10:21 am Post subject:
Siva,
Just treat those as character (CH):
ON(1,8,CH)
Actually, for the original example you showed, you could treat the numeric values as CH as well. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Thu Oct 30, 2008 10:52 am Post subject:
sivadfms,
please use code blocks and mention the positions. I edited your post to be in the readable format. The following DFSORT JCL will give you desired results
It is working fine for FB file but when i use the same input in VB it is giving following error.
Code:
SORTIN : RECFM=VB ; LRECL= 4100; BLKSIZE= 27998
SORTOUT OUTREC RDW NOT INCLUDED
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
i tried this control card
Code:
INCLUDE COND=(273,4,CH,EQ,C'JE11',AND,288,4,CH,EQ,C'JF17')
SORT FIELDS=COPY
OUTFIL BUILD=(C'NO OF TRASACTIONS : ',277,11,/,
C'TOTAL AMOUNT : ',292,17)
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Fri Oct 31, 2008 10:31 am Post subject:
sivafdms,
Your error messages indicate that you are using Syncsort.
I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
This is pretty self explanatory. For a VB file, you must include the RDW (1,4) in OUTREC... unless you are converting it to an FB file... which requires additional coding as well. _________________ Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum