IBM Support

Regular expressions application notes

Troubleshooting


Problem

The following existing DFSORT functions are not compatible when used with Regular expressions:
• Locale
• EFS
• COBOL E15 and E35 user exits with COPY
• COBOL E15 user exit when regular expression is used in INCLUDE/OMIT control statement
• COBOL E35 user exit when regular expression is used in OUTFIL’s INCLUDE/OMIT control statement.
For a JOINKEYS application, no more than one task can use regular expressions. Regular expressions can only be used in the main task or subtask 1 or subtask 2 and not in any combination of tasks.
Example : Show the usage of Regular expressions with JOINKEYS application

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//INA      DD DISP=SHR,DSN=Your.input.file1
//INB      DD DISP=SHR,DSN=Your.input.file2
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                    
  OPTION COPY                                                       
  JOINKEYS F1=INA,FIELDS=(10,4,A)                                    
  JOINKEYS F2=INB,FIELDS=(10,4,A)                                    
  JOIN UNPAIRED                                             
  REFORMAT FIELDS=(F1:10,4,F2:10,4,F1:3,6,F2:3,6)   
/*                                                                 
//JNF1CNTL DD *                                                    
  OMIT COND=(10,4,SS,RE,C'8D[0-9A-F]{2,2}')                        
/* 
//JNF2CNTL DD *                                                    
  OMIT COND=(10,4,CH,EQ,C' ')                        
/*                                                                
Note: Regular expressions can only be used in the main task or subtask 1 or subtask 2 and not in any combination of tasks. 

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB56","label":"Z HW"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG90","label":"z\/OS"},"ARM Category":[{"code":"a8m0z0000000AGAAA2","label":"DFSMS->DFSORT"}],"ARM Case Number":"","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"All Versions"}]

Document Information

Modified date:
08 February 2022

UID

ibm16554050