can i use in one line of that sort

Discuss about all tools related to Mainframes but usable in a PC/Computer like Mainframe Simulators, Emulators, Abend Assist etc...
arya_starc
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Skillset: VSAM,CICS,JCL,COBOL
Referer: INTERENT

can i use in one line of that sort

Postby arya_starc » Thu Sep 15, 2016 12:02 pm

Hi all,

As I need to add include condition in sort, as these are in same position. can I add in single line
below is my sort

Code: Select all

 SORT FIELDS=(41,19,ZD,A,74,4,PD,A,132,6,ZD,A)                    
  INCLUDE COND=((343,4,CH,EQ,C'DITM'),OR,(343,4,CH,EQ,C'DINP'),OR,
                (343,4,CH,EQ,C'DINR'),OR,(343,4,CH,EQ,C'RLWO'),OR,
                (343,4,CH,EQ,C'RLWI'),OR,(343,4,CH,EQ,C'RLFR'),OR,
                (343,4,CH,EQ,C'RLWA'),OR,(343,4,CH,EQ,C'RLWC'),OR,
                (343,4,CH,EQ,C'RLMC'),OR,(343,4,CH,EQ,C'RDWC'),OR,
                (343,4,CH,EQ,C'RDWI'),OR,(343,4,CH,EQ,C'EPWO'),OR,
                (343,4,CH,EQ,C'EPWC'),OR,(343,4,CH,EQ,C'SMWO'))
 

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: can i use in one line of that sort

Postby NicC » Thu Sep 15, 2016 2:41 pm

Nothing to do with COBOL - topic moved.

I am not sure what you are asking/meaning! Give an example - not just words.

What have you tried? What happened - apart from "it did not work"?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

ottoelflaco
Posts: 36
Joined: Fri Sep 21, 2012 2:33 pm
Skillset: cobol, jcl
Referer: Looking for help

Re: can i use in one line of that sort

Postby ottoelflaco » Thu Sep 15, 2016 6:45 pm


Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: can i use in one line of that sort

Postby Robert Sample » Thu Sep 15, 2016 8:06 pm

You have not clearly identified what you want instead of the code you posted.

I suspect what you want to know is in the DFSORT Application Programming Guide in the Substring Comparison Tests under the INCLUDE control statement:manual:
2.Find a field value within a constant. For example, you can search the character constant C'J69,L92,J82' for the value in a 3-byte field. If the field value is C'J69', C'L92', or C'J82', the relational condition is true; if the field value is C'X24', the relational condition is false. Note that the comma is used within the constant to separate the valid 3-character values; any character that will not appear in the field value can be used as a separator in the constant.

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

Re: can i use in one line of that sort

Postby BillyBoyo » Thu Sep 15, 2016 9:48 pm

I would also guess the same way as Robert.

Also note that it does not matter the order you specify the Control Statements, they will be processed in the order specified by SORT. No matter what you think from what you have specified, the INCLUDE will be processed before the SORT. It doesn't matter in your example, because there is no expected relationship between the two statements, but if you tried to write OUTREC before SORT, for instance, you won't get what you expect.

enrico-sorichetti
Global moderator
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
Referer: www.ibmmainframes.com

Re: can i use in one line of that sort

Postby enrico-sorichetti » Thu Sep 15, 2016 11:23 pm

Code: Select all

INCLUDE COND=((343,4,CH,EQ,C'DITM'),OR,(343,4,CH,EQ,C'DINP'),OR,


my guess is that the TS wants to know if the condition can be written as something like

Code: Select all

INCLUDE COND=(343,4,CH,EQ,C'DITM',OR,C'DINP',OR,....,OR,....
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

pranav283
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Skillset: JCL, COBOL, DB2, CICS, VSAM, MQ
Referer: Internet

Re: can i use in one line of that sort

Postby pranav283 » Tue Sep 20, 2016 1:27 pm

Contents deleted as it did nothing except plagiarise Enrico's post and did not do it nearly as well - partly because the code tags were not used.


  • Similar Topics
    Replies
    Views
    Last post