View previous topic :: View next topic
Author
Message
ShobhitVerma10april New User Joined: 28 Jun 2014Posts: 21 Location: INDIA
Hi Bill ,
I gave this sort card as you said :
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,93,10,986X)),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,14),PUSH=(15:ID=10))
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,15,
TRAILER3=(1,15,X,COUNT=(M11,LENGTH(10))))
But it is not working.
Could you please correct it .
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
I have no clue of what is not working because you've failed to mention that.
Back to top
ShobhitVerma10april New User Joined: 28 Jun 2014Posts: 21 Location: INDIA
HI Bill ,
Sorry for inconvenience
Here is the details :
INPUT :
ABC 12 A0
ABC 12 A0
ABC 12 A0
ABC 12 B0
GHT 13 B0
GHT 13 B0
GHT 13 C0
GHT 13 B0
UIO 12 C0
UIO 12 C0
UIO 12 D0
OUTPUT :
ABCA00 00003
ABCB00 00001
GHTB00 00002
GHTC00 00001
GHTB00 00001
UIOC00 00002
UIOD00 00001
SORT CARD :
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,BUILD=(1,3,8,2,75X)),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,5),PUSH=(6:ID=5))
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,6,
TRAILER3=(1,6,X,COUNT=(M11,LENGTH(5))))
In this , if you see GHTB0 should come 3 times but here it is coming as two occurrence 2 and 1 .
Back to top
Terry Heinze JCL Moderator Joined: 14 Jul 2008Posts: 1249 Location: Richfield, MN, USA
Please use Code tags for readability.
Back to top
Rohit Umarjikar Global Moderator Joined: 21 Sep 2010Posts: 3053 Location: NYC,USA
Hi,
From the second post of Bill I see that, He asked for data to be in order record to record and you said it is sorted, then why did in the above example it is not sorted based on 1st and 3rd field?
Code:
ABC 12 A0
ABC 12 A0
ABC 12 A0
ABC 12 B0
GHT 13 B0
GHT 13 B0
GHT 13 C0
GHT 13 B0
UIO 12 C0
UIO 12 C0
UIO 12 D0
Back to top
ShobhitVerma10april New User Joined: 28 Jun 2014Posts: 21 Location: INDIA
Hi Bill ,
I used following syntax but its is giving me an error at OMIT
SORT FIELDS=(1,1000,CH,A)
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,93,10,986X)),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,14),PUSH=(15:ID=5)),
IFTHEN=(WHEN=INIT,OMIT=(17,5,ZD,LE,400)) OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,15,
TRAILER3=(1,15,X,COUNT=(M11,LENGTH(5))))
Can you please correct it .
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
No, you are making things up. How can I correct stuff if you just make up your own syntax?
Also, what about Rohit's question? Can't do anything til you answer that.
Back to top
ShobhitVerma10april New User Joined: 28 Jun 2014Posts: 21 Location: INDIA
Yes , that i corrected and sorted the records as you see in the card . And that issue is resolved.
Now i have to remove those records which are having count greater than 100 or anything . How can i implement it in the same card .
Back to top
ShobhitVerma10april New User Joined: 28 Jun 2014Posts: 21 Location: INDIA
It worked with below sort card :
SORT FIELDS=(1,1000,CH,A)
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,93,10,986X)),
IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,14),PUSH=(15:ID=5))
OMIT COND=(17,5,ZD,LE,00400)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,15,
TRAILER3=(1,15,X,COUNT=(M11,LENGTH(5))))
Thanks Everyone!!!
Back to top
Please enable JavaScript!