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...

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
 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'))
 
arya_starc
 
Posts: 136
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 5 times
Been thanked: 0 time

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
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: can i use in one line of that sort

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

ottoelflaco
 
Posts: 36
Joined: Fri Sep 21, 2012 2:33 pm
Has thanked: 1 time
Been thanked: 0 time

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: can i use in one line of that sort

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

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

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
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

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.
pranav283
 
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Has thanked: 2 times
Been thanked: 0 time


Return to Simulators & Emulators