View previous topic :: View next topic
|
Author |
Message |
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
Hi ALL,
we have a requirement like..
Step1 have one sortin file .The file have value 'A' in 9th position.for this sinaerio i have to skip the step2 or do to condtion code.
If any other value we need to allow the next step..
Can you please help to create a JCL for the above condtions. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
here is a snippet that will retuun a 4/0 rc
Code: |
****** ***************************** Top of Data ******************************
- - - - - - - - - - - - - - - - - - - 3 Line(s) not Displayed
000004 //RC4 EXEC PGM=SORT
000005 //SYSPRINT DD SYSOUT=*
000006 //SYSOUT DD SYSOUT=*
000007 //SORTIN DD *
000008 12345678901234567890
000009 //SORTOUT DD DUMMY
000010 //SYSIN DD *
000011 OPTION COPY
000012 OUTFIL NULLOFL=RC4,INCLUDE=(9,1,CH,EQ,C'A')
000013 //*
000014 //RC4 EXEC PGM=SORT
000015 //SYSPRINT DD SYSOUT=*
000016 //SYSOUT DD SYSOUT=*
000017 //SORTIN DD *
000018 12345678A01234567890
000019 //SORTOUT DD DUMMY
000020 //SYSIN DD *
000021 OPTION COPY
000022 OUTFIL NULLOFL=RC4,INCLUDE=(9,1,CH,EQ,C'A')
000023 //*
****** **************************** Bottom of Data **************************** |
result
Code: |
14.32.08 JOB00813 IEF403I ENRICO1 - STARTED - TIME=14.32.08
14.32.08 JOB00813 HTRT01I CPU (Total)
14.32.08 JOB00813 HTRT02I Jobname Stepname ProcStep RC I/O hh:mm:ss.th
14.32.08 JOB00813 HTRT03I ENRICO1 RC4 04 39 00.05
14.32.08 JOB00813 HTRT03I ENRICO1 RC4 00 38 00.05
14.32.08 JOB00813 IEF404I ENRICO1 - ENDED - TIME=14.32.08 |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Not really clear what you are after, but see if NOTMTOUT/NULLOUT, NOTMTOFL/NULLOFL can give you what you want. If you write all your As to SORTOUT/an OUTFIL you can set an RC (limited range of values).
What is available to you depends on your version of SyncSort. If you 1.4 onwards, I think you will have NOTMTOUT and NOTMTOFL, and it will be easy. You can dummy out the output in the JCL, since you won't need it, you just want the return-code. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
posted a DFSORT snippet ...
I had not noticed the post being in the JCL section for SYNCSORT |
|
Back to top |
|
|
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
enrico-sorichetti wrote: |
here is a snippet that will retuun a 4/0 rc
Code: |
****** ***************************** Top of Data ******************************
- - - - - - - - - - - - - - - - - - - 3 Line(s) not Displayed
000004 //RC4 EXEC PGM=SORT
000005 //SYSPRINT DD SYSOUT=*
000006 //SYSOUT DD SYSOUT=*
000007 //SORTIN DD *
000008 12345678901234567890
000009 //SORTOUT DD DUMMY
000010 //SYSIN DD *
000011 OPTION COPY
000012 OUTFIL NULLOFL=RC4,INCLUDE=(9,1,CH,EQ,C'A')
000013 //*
000014 //RC4 EXEC PGM=SORT
000015 //SYSPRINT DD SYSOUT=*
000016 //SYSOUT DD SYSOUT=*
000017 //SORTIN DD *
000018 12345678A01234567890
000019 //SORTOUT DD DUMMY
000020 //SYSIN DD *
000021 OPTION COPY
000022 OUTFIL NULLOFL=RC4,INCLUDE=(9,1,CH,EQ,C'A')
000023 //*
****** **************************** Bottom of Data **************************** |
result
Code: |
14.32.08 JOB00813 IEF403I ENRICO1 - STARTED - TIME=14.32.08
14.32.08 JOB00813 HTRT01I CPU (Total)
14.32.08 JOB00813 HTRT02I Jobname Stepname ProcStep RC I/O hh:mm:ss.th
14.32.08 JOB00813 HTRT03I ENRICO1 RC4 04 39 00.05
14.32.08 JOB00813 HTRT03I ENRICO1 RC4 00 38 00.05
14.32.08 JOB00813 IEF404I ENRICO1 - ENDED - TIME=14.32.08 |
|
Hi Enrico,
Thank you very much for you useful JCL!!!
Quote de-mangled |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
No problem enrico. It is the same solution for earlier versions of SyncSort.
The "NOTMT" (must stand for something, can't think what...) extend the ability to set the RC so that it can be done when data is written to SORTOUT or an OUTFIL dataset, which simplifies some negative and contrived situations. |
|
Back to top |
|
|
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
Hi Enrico,
Acutally i have 100 records in input file.But i want to check only the first record.How can we do this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Code: |
OPTION COPY,STOPAFT=1 |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Bill Woodger wrote: |
The "NOTMT" (must stand for something, can't think what...) |
Hi Bill,
Since this for issuing an RC when the correponding output dd is NOT empty, NOTMT could indicate NOTempty |
|
Back to top |
|
|
|