Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Cond code using previous step record count in sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 72
Location: Chennai

PostPosted: Tue Apr 29, 2014 5:36 pm    Post subject: Cond code using previous step record count in sort
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Apr 29, 2014 6:04 pm    Post subject: Reply to: How to do cond code using previous step record cou
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Apr 29, 2014 6:05 pm    Post subject: Reply to: How to do cond code using previous step record cou
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Apr 29, 2014 6:10 pm    Post subject: Reply to: How to do cond code using previous step record cou
Reply with quote

icon_redface.gif
posted a DFSORT snippet ...

I had not noticed the post being in the JCL section for SYNCSORT
Back to top
View user's profile Send private message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 72
Location: Chennai

PostPosted: Tue Apr 29, 2014 6:41 pm    Post subject: Re: Reply to: How to do cond code using previous step record
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Apr 29, 2014 6:44 pm    Post subject: Reply to: How to do cond code using previous step record cou
Reply with quote

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
View user's profile Send private message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 72
Location: Chennai

PostPosted: Tue Apr 29, 2014 8:18 pm    Post subject: Reply to: How to do cond code using previous step record cou
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Apr 29, 2014 8:31 pm    Post subject: Reply to: How to do cond code using previous step record cou
Reply with quote

Code:
    OPTION COPY,STOPAFT=1
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Apr 30, 2014 12:20 pm    Post subject: Re: Reply to: How to do cond code using previous step record
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us