I read earlier a discussion thread on COBOL function lists in UltraEdit. I play around with the regex from that discussion. My goal is to have a function list for COBOL that lists all paragraphs in the procedure division. I do not have a problem with the "exit" paragraphs showing up. I started out with the regex that came with the COBOL wordfile that I downloaded form the IDM webpages. Which is the first line of my current regex for the function list. Below is my current function list regex:
%[ ^t]+^([a-z^-]+^) ^{division^} ^{section^}
%[ ^t]++^([0-9a-z-_]++[~end-if .]^).^
% 0000-^main
I left the first regex line in because I like to have the COBOL sections and divisions for a point of reference. The second regex line seems to get most of the COBOL paragraphs to show up. For your information I used "[~end-if .]" to get rid of a bunch of "end-if" 's showing up in my list. The third regex line is to get the "0000-main" paragraph to show up in the list. Below is a code snippet from the COBOL program, which only shows the paragraphs.
0000-main. <----- doesn't find with just the second regex line. why??
0010-server-init.
0020-assign-input-fields.
0030-assign-output-fields.
0040-standardize-sp-params.
0050-validate-logon. <----- doesn't find with all 3 regex lines. why??
0055-get-users-hipaa-unit.
0060-process-request.
0070-LOG-ACTIONS.
So, I guess I have two questions:
%[ ^t]+^([a-z^-]+^) ^{division^} ^{section^}
%[ ^t]++^([0-9a-z-_]++[~end-if .]^).^
% 0000-^main
I left the first regex line in because I like to have the COBOL sections and divisions for a point of reference. The second regex line seems to get most of the COBOL paragraphs to show up. For your information I used "[~end-if .]" to get rid of a bunch of "end-if" 's showing up in my list. The third regex line is to get the "0000-main" paragraph to show up in the list. Below is a code snippet from the COBOL program, which only shows the paragraphs.
0000-main. <----- doesn't find with just the second regex line. why??
0010-server-init.
0020-assign-input-fields.
0030-assign-output-fields.
0040-standardize-sp-params.
0050-validate-logon. <----- doesn't find with all 3 regex lines. why??
0055-get-users-hipaa-unit.
0060-process-request.
0070-LOG-ACTIONS.
So, I guess I have two questions:
- Why does the second line of my regex not find paragraph "0000-main."?
- Why does paragraph "0050-validate-logon." not show up in my list?