I am not aware of any available DFSORT list one could subscribe to.  To what 
list are you referring?

The Fine Manual you pointed at does NOT say that the CP037 table in Appendix D 
is what to use for RE expressions, it specifically says to use CP1047 for RE 
expressions.  On page 107 in table 24 it shows at least some of the CP1047 
characters for RE's (granted only as graphic symbols and not as hexadecimal 
equivalents).  In addition, on page 836 at the bottom of the CP037 table it 
also says that CP1047 is required for regular expressions, though there is no 
CP1047 table to show the differences.

Table 24 does indeed not show all the RE control characters, in particular the 
vertical bar, the asterisk and the question mark are not described.  In 
addition, the display of meta-characters immediately preceding table 24 use the 
EBCDIC not symbol instead of the caret.  RCF required there.

IMHO no “programmer option” is needed – If you code a BRE as the RE then that’s 
what you’ll execute, if you code an ERE then that is what you’ll execute.  ISTM 
that it's up to the underlying RE compiler to determine the syntax in use.

I imagine the SORT RE processor only has to pass the specified RE to the 
underlying RE compiler (I'm guessing that is probably the non-reentrant C 
library version based on the limitation to using RE's in only one task in the 
SORT processes) and not care how it is coded, it’s up to the programmer to use 
correct syntax for whichever style they choose to use.

If in fact the underlying RE compiler is the C library version they could have 
included a reference to the C runtime library document "for further information 
about RE syntax and usage".

Peter

From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Paul Gilmartin
Sent: Thursday, April 10, 2025 12:01 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: regular expressions in DFSORT

(I'm not a subscriber of DFSORT.  I'll pst here and hope it percolates.  I'll 
submit this as a Feedback)

In:  SC23-6878-60 DFSORT Application Programming Guide
<https://urldefense.com/v3/__https://www.ibm.com/docs/en/SSLTBW_3.1.0/pdf/icea100_v3r1.pdf__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!KyubeZqWOSsdbiBeVKxQBrgYIybmsFKCIb2Pt6oNtiBMqZGfh-NGo1TiJ6Jgq6j-vLuV1W5a_es5NXMRRmeu9QPMy2dWoGmNzdhGXf38$>

• Regular expression characters require code page (CCSID) IBM-1047. See Table 
109 on page 833.
But the table cited shows nog 1047 but 037.
Accuracy matters.  Not all RE control characters
appear in that table.

Two versions of regular expressions are supported:
• Basic regular expressions (BRE)
• Extended regular expressions (ERE)
It fails to specify which is supported:
• (BRE)?
• (ERE)?
• Programmer's option (selected how?)

-- 

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to