home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
viscobv7.zip
/
vac22os2
/
ibmcobol
/
macros
/
datadiv.lx
< prev
next >
Wrap
Text File
|
1998-02-24
|
1KB
|
49 lines
/* */
'goview name Data_Division'
'top'
'find any data division'
call process_rc rc
if result = 0 then
'extract class' /* get the class of this line */
else
exit
do while (pos("DIVISION",class) = 0)
'find any data division'
call process_rc rc
if result = 0 then
'extract class' /* get the class of this line */
else
exit
end /* do while */
exit
process_rc: procedure
arg rt
select
when rt = 0 then
do
return 0
end
when rt = 1 then
do
'quitview'
say 'No valid occurrences of Data Division found'
return 1
end
when rt = 2 then
do
'quitview'
say 'No valid occurrences of Data Division found'
return 2
end
when rt = 3 then
do
'quitview'
say 'No valid occurrences of Data Division found'
return 3
end
otherwise
say 'Unexpected return code ' rt ' from FIND'
return rt
end /* select */