View previous topic :: View next topic
|
Author |
Message |
sasanka Warnings : 1 New User
Joined: 18 Jan 2008 Posts: 34 Location: India
|
|
|
|
When I try to execute the following JCL, it gives MAXCC = 16
JCL is mentioned below ----
Code: |
//S005U EXEC PGM=SORT
//SORTIN DD DSN=A333.TEST.FILE,DISP=SHR
//SORTOF01 DD DSN=A333.TEST.OUTFILE,
// DISP=(,CATLG,DELETE),
// UNIT=3390,
// SPACE=(TRK,(02,2),RLSE)
//SYSIN DD *
OUTFIL FILES=01,INCLUDE COND=(11,1,CH,EQ,C'0')
STOPAFT=05
/*
//SYSOUT DD SYSOUT=*
//*
|
The contents of input file A333.TEST.FILE are
Code: |
----+----1----+----2
H F PPG 4 BLM
H M PPG 0 EHF
H F LIV 1 TAY
H F LIV 0 TAY
H F LIV 4 CAN
H F BLM 4 BLM
H M SSF 1 GPF
H F STG 4 GPF
H M BLM 4 LIV
H F HFH 0 HFH
H M SSF 0 FRL
H M SSF 0 TDC
H F LKS 4 LKS
H M NVI 0 EBL
H M NVI 4 EBL
H M NVI 0 OFP
H M GPF B HFH
H M HFH B HFH
H F BLM 4 EBL
|
But in the SYSOUT message shows,
SYSIN :
OUTFIL FILES=01,INCLUDE COND=(11,1,CH,EQ,C'0')
*
STOPAFT=05
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
If I use the following sort-card it also gives MAXCC = 16
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(11,1,CH,EQ,C'0')
OUTFIL FILES=01
STOPAFT=05
/*
If I use this above sort-card, message comes in SYSOUT is
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(11,1,CH,EQ,C'0')
OUTFIL FILES=01
STOPAFT=05
*
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Please anybody help me in solving it.
Thanks,
sasanka |
|
Back to top |
|
|
ashok_srivatsav Currently Banned New User
Joined: 29 Jun 2007 Posts: 15 Location: India, Bangalore
|
|
|
|
try this
SORT FIELDS=COPY,STOPAFT=5
OUTFIL FILES=1,INCLUDE COND=(11,1,CH,EQ,C'0')
OR
SORT FIELDS=COPY,STOPAFT=5
OUTFIL FILES=1,INCLUDE=(11,1,CH,EQ,C'0') |
|
Back to top |
|
|
ashok_srivatsav Currently Banned New User
Joined: 29 Jun 2007 Posts: 15 Location: India, Bangalore
|
|
|
|
this works.
SORT FIELDS=COPY,STOPAFT=5
OUTFIL FILES=01,INCLUDE=(11,1,CH,EQ,C'O') |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Could you guys please use the code tag while posting the code? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Sasanka,
Quote: |
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT |
The control card statements should not start from column 1. Code accordingly and it would work. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
I think STOPAFT can't be used with OUTFIL; further when I tried the input data posted there was no such data in the input which can "map" to the conditon to select those records which have "0" at position 11. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
I was right in both the above assumptions, try this JCL
Code: |
//S005U EXEC PGM=SORT
//*
//SORTIN DD *
H F PPG 4 BLM
H M PPG 0 EHF
H F LIV 1 TAY
H F LIV 0 TAY
H F LIV 4 CAN
H F BLM 4 BLM
H M SSF 1 GPF
H F STG 4 GPF
H M BLM 4 LIV
H F HFH 0 HFH
H M SSF 0 FRL
H M SSF 0 TDC
H F LKS 4 LKS
H M NVI 0 EBL
H M NVI 4 EBL
H M NVI 0 OFP
H M GPF B HFH
H M HFH B HFH
H F BLM 4 EBL
/*
//SORTOF01 DD SYSOUT=*
//*
//SYSIN DD *
OPTION COPY
OUTFIL FILES=01,ENDREC=5,INCLUDE=(9,1,CH,EQ,C'0')
/*
//SYSUDUMP DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//* |
And by the way there is no need of SORT work files, you just copy the data...why would you use them, should I ask ? |
|
Back to top |
|
|
ashok_srivatsav Currently Banned New User
Joined: 29 Jun 2007 Posts: 15 Location: India, Bangalore
|
|
|
|
sasank
What is the LRECL of your input?
Ashok |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello sasanka,
If you still want to use STOPAFT, you may try this out.
Code: |
//SYSIN DD *
INCLUDE COND=(9,1,CH,EQ,C'0')
SORT FIELDS=COPY,STOPAFT=5
OUTFIL FILES=01
/* |
Thanks,
Arun |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Arun,
With the above SORT card, output would contain five records & will stop after that, With the above SORT card it'll try to scan the whole input, so the output with the given input would be:
Code: |
H M PPG 0 EHF
H F LIV 0 TAY
H F HFH 0 HFH
H M SSF 0 FRL
H M SSF 0 TDC |
while with my sort card input will be searched upto fifth record & the records matching to the sort card will be put into output & they would be:
Code: |
H M PPG 0 EHF
H F LIV 0 TAY |
I think TS would like to use your SORT card, umm...but.. hmmm..I've nothing to say now.. |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Hi Anuj really interesting point from you.
Can you please let me know is ENDREC / STOPAFT that is responsible for this?? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi Sri,
Yes it's because of them -
ENDREC=n parameter is used to specify the record number, n, of the last record to be processed by the OUTFIL specification in effect. All records after the specified record will be ignored for the OUTFIL group. The record number is determined by the sequence of records presented for OUTFIL processing. So, with my SORT only first five records of input were searched.
STOPAFT=n (a decimal number) sorts/copies at most n records. And so there are total 5 records in the output when Arun's card is used.
If we dont use any of them, output would contain below seven records in the output for the given input:
Code: |
H M PPG 0 EHF
H F LIV 0 TAY
H F HFH 0 HFH
H M SSF 0 FRL
H M SSF 0 TDC
H M NVI 0 EBL
H M NVI 0 OFP |
Hope this helps.. |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Thank you Anuj..It sounds good.. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hopefully I had been helpful.. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
In addition to Anuj's points, here is the sequence by which the above control statements are executed.
Code: |
INCLUDE/OMIT
|
|
SORT FIELDS=COPY,SKIPREC/STOPAFT
|
|
________________OUTREC ______________
| |
| |
OUTFIL FILES=01, OUTFIL FILES=02,
STARTREC/ENDREC STARTREC/ENDREC |
Thanks,
Arun |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Hi Arun thanks for your reply.I too has seen this somewhere but i do not remember the source.Could you please share the source path(link)if you have any from where you got this. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello Sri,
Do you have a SYNCSORT manual? It has the Data Utility Processing Sequence which describes the same in a simple and easily understandable manner.
Thanks,
Arun |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
arcvns wrote: |
Hello Sri,
Do you have a SYNCSORT manual? It has the Data Utility Processing Sequence which describes the same in a simple and easily understandable manner.
Thanks,
Arun |
I do not have SYNCSORT as we use DFSORT.Could you please share that document. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
sri_mf wrote: |
I do not have SYNCSORT as we use DFSORT.Could you please share that document. |
No, thay can't be shared via the forums as they are copyright material. The functions we are talking about here are well documneted in DFSORT Manuals as well, take a look there. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Thank you Anuj and Frank |
|
Back to top |
|
|
|