IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

include cond ascii constant


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
johnnymossin

New User


Joined: 12 Jan 2021
Posts: 2
Location: denmark

PostPosted: Tue Jan 12, 2021 6:41 pm
Reply with quote

I trying to select some records from a ascii encoded dataset.

this is working:

INCLUDE COND=(1,5,CH,EQ,X'3031323334')

I was guessing that this should be the same, but does not select any records:

INCLUDE COND=(1,5,AC,EQ,C'01234')

maybe AC format does not work like this. but this example is very simplified, and I could really use the extra space pr line, that a C'' would give, rather than be forced to use X''.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2135
Location: USA

PostPosted: Tue Jan 12, 2021 7:42 pm
Reply with quote

1. Print your ACTUAL input field to verify this:
Code:
 BUILD=(1,5,HEX,...)


2. According to SORT manual, in your INCLUDE/OMIT statements the format AC can be compared only to AC, and nothing else.
Sometimes reading the manual could help.

3. AC format definition: EBCDIC characters are translated to their ASCII equivalent before merging (and whatever else). Your understanding is just opposite to this definition.
Back to top
View user's profile Send private message
johnnymossin

New User


Joined: 12 Jan 2021
Posts: 2
Location: denmark

PostPosted: Tue Jan 12, 2021 7:56 pm
Reply with quote

thanx for a very fast answer.

I did read the manual, and saw the matrix on include cond formats.

and I guessed as much, I just posted the question to be sure, since I could really use the extra space pr line.

and if AC can't be compare to C'01234', sort might have given me an error msg.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2135
Location: USA

PostPosted: Tue Jan 12, 2021 8:12 pm
Reply with quote

johnnymossin wrote:

and if AC can't be compare to C'01234', sort might have given me an error msg.

This is not syntax error, there is no error message.

This is logical error in your algorithm. Same as
Code:
x = 100;
y = 0;
z = x / y;

There is no compiler error message, but the result will be not what you might expect...
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Tue Jan 12, 2021 9:30 pm
Reply with quote

www.ibm.com/support/knowledgecenter/en/SSLTBW_2.2.0/com.ibm.zos.v2r2.icea100/sorcst.htm
Quote:
The AC format sequences EBCDIC data using the ASCII collating sequence shown in Appendix D. For example, if AC is used with ascending sequence, the EBCDIC numbers (0-9) will collate before the EBCDIC uppercase letters (A-Z) which in turn will collate before the EBCDIC lowercase letters (a-z).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts ISRDSLST(3.4) Do not include addition... TSO/ISPF 0
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top