Welcome!
Please go thru the forum rules to know how to use Code tags.
Quote:
i am aware we can use sort/syncsort jcl, could you please help what i need to code in sysin to get desired results
You are asking for a ready-made solution for a simple task. You did not even try to search the forum. There are already several discussions on the same requirements like you have so please take a time and do some research and try it your self first else as suggested navigate to Beginners forum.
SYSIN :
SORT FIELDS=(1,5,UFF,A)
OUTFIL FNAMES=(SORTOUT),
REMOVECC,NODETAIL,
SECTIONS=(1,5,
TRAILER3=(C'TOTAL NUMBER OF '1,5 C'''S ARE',COUNT))
*
END
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
When I do JCL check before summitting job , I got error message like below
LINE # LABEL# SV MSG. ID. ERROR MESSAGE TEXT
====== ====== == ======== ============================================
000010 8 CAY6018E UNMATCHED PARENTHESES
000010 8 CAY6048E "C"TOTAL NUMBER OF "1" IS ILLEGAL OPERAND
FOR "R|P,L|KEYWORD" PARAMETER OF "TRAILER3"
000010 4 CAY6032W VALUE OF "M" PARAMETER OF "TRAILER3"
SHOULD NOT BE NULL
Sorry my bad, made corrections but jcl is getting filed with “SORTOUT HEADER/TRAILER N FIELD OUTSIDE RANGE "
I have input file which has millions of records , example below
12345
12345
12345
12345
12345
12345
12345 ( I have repeated lines of 12345 around 3000 times)
..
..
..
56789
56789
56789
56789
56789
56789
56789 ( I have repeated lines of 56789 around 6000 times)
//SYSIN DD *
SORT FIELDS=(1,5,UFF,A)
OUTFIL FNAMES=(SORTOUT),
REMOVECC,NODETAIL,
SECTIONS=(1,5,
TRAILER3=(C'TOTAL NUMBER OF ',1,5,C'''S ARE: ',COUNT))
END
/*
WER108I SORTIN : RECFM=FB ; LRECL= 5; BLKSIZE= 32760
WER073I SORTIN : DSNAME=DB2D.DBA.A667353.H3.T1
WER110I SORTOUT : RECFM=FB ; LRECL= 5; BLKSIZE= 32760
WER074I SORTOUT : DSNAME=A667353.A66735S2.J0596997.D0000103.?
WER230A SORTOUT HEADER/TRAILER N FIELD OUTSIDE RANGE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Joined: 15 Aug 2015 Posts: 1341 Location: Bamberg, Germany
One more:
Code:
SORT FIELDS=(1,5,UFF,A)
OUTFIL FNAMES=(SORTOUT),
REMOVECC,NODETAIL,
SECTIONS=(1,5,
TRAILER3=(C'TOTAL NUMBER OF ',1,5,C'''S ARE: ',COUNT)),
BUILD(80:X)
END
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
The solution has nowt to do with JCL and all the utility messages are from Syncsort. This is the DFsort section of the forum. Topic moved whereupon the previous should say 'was the dfsort...'