home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
MTWOLINE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
5KB
|
169 lines
* Program MTWOLINE - One-line roster of a selected group from the input file.
* Inputs: ANAME - type of filename
* File name (Already "USED")
* ANAME,ANAME1 - Selected group within FILENAME; quit when &ANAME<>ANAME1
* BNAME - Selected subgroup to be selected; skip all records that
* have &BNAME "True"
* CNAME - First line title
* OTH1 - OTHER code to be printed in OTH field when not blank and matched
* MSEL - Selected report type: From SSSC or SP:ACTIVTY; with switches
* ANAME - Type of file being read: SSSC,SPAC
* This is an incomplete list of input parameters.
If ANAME1<>'ALL'
Find &ANAME1
If # = 0
? 'No records in this file with this code. '
Store F to invalidd
RETURN
endif
endif
Store MSEL to othfield
Store ' ' to oth1
? 'Now printing a two-line report [TL] for ',ANAME1
Select secondary
Store len(othfield) to lenfield
If lenfield > 1
Store $(othfield,2,1) to othf2
If othf2='/' .or. othf2='\'
If lenfield>4
Store $(othfield,3,3) to oth1
Store oth1+':' to othfind
Find &othfind
If # = 0
? 'OTHER code not found in MDIRFILE. '
RETURN
else
Store trim($(spact,6,6))+':' to othheadr
endif
else
? 'OTHER code option not 3 characters.'
RETURN
endif
endif
endif
Select primary
Store 99 to curline
Store 0 to pagenum
Store T to BEGINNG
Set format to print
Store val($(date(),7,2)) to curyear
Store T to mornames
IF LEN(CNAME)<40
STORE ' '+CNAME to CNAME
endif
Do while mornames
If curline > 62
If .not. BEGINNG
EJECT
endif
Store pagenum+1 to pagenum
@ 0,0 say CNAME
@ 0,52 say curdate
@ 0,72 say 'Page'+str(pagenum,3)
@ 2,0 say fcolhdr
@ 2,13 say 'PHONE NAME ADDRESS'
Store 4 to curline
endif
If .not. BEGINNG
Store ' ' to graddate
If oth1<>' '
If othf2='\'
Store $(birthdate,10,2) to graddate
If graddate<>' '
Store val(graddate) to faddress
If faddress<50
Store 100+faddress to faddress
endif
Store faddress-curyear to faddress
If nmonth>5
Store str(13-faddress,2) to graddate
else
Store str(12-faddress,2) to graddate
endif
endif
endif
endif
@ curline,0 say &FCOLUMN
@ curline,12 say home:phone
If $(ss:sc:memb,4,1)=chr(31)
@ curline,21 say '"'
else
If $(membstatus,1,1) = 'Y'
@ curline,21 say '-'
else
If $(dates,1,4)=indate
@ curline,21 say '\'
endif
endif
endif
Store trim(first:name)+' '+trim(last:name) to fname
If len(fname) > 19
Store $(fname,1,19)+'_' to fname
endif
@ curline,22 say fname
Store trim(address)+', '+trim(city:state) to faddress
If len(faddress) > 31
Store $(faddress,1,31) to faddress
endif
@ curline,42 say trim(faddress)+' '+zip
Store curline+1 to curline
@ curline,0 say str(#,4)+' '+$(membstatus,3,2)
If oth1 <> ' '
If $(other,1,1)<>' '
Store 1 to curothr
Store other to othera
STORE ' ' TO OTHNAM1
Select secondary
Do while curothr < 4
Store $(othera,curothr*8-7,3) to otherx
If otherx=' '
Store 4 to curothr
else
If otherx = oth1
Store otherx+$(othera,curothr*8-4,4) to othfind
Find &othfind
If # <> 0
Store $(spact,9,20) to othnam1
endif
endif
Store curothr+1 to curothr
endif
enddo
Select primary
IF OTHNAM1<>' '
@ curline,8 say othheadr+othnam1
ENDIF
endif
else
@ curline,8 say othheadr+&othnam1
endif
@ curline,37 say 'DATES:'+$(dates,1,9)
@ curline,54 say 'BA:'+$(spec:dates,1,8)+' '+$(comments,1,14)
SKIP
Store curline+2 to curline
endif
Store F to BEGINNG
Do while .not. EOF .and. (* .or. &BNAME)
SKIP
enddo
If EOF .or. &ANAME<>ANAME1
Store F to mornames
endif
ENDDO
If curline=99
@ 5,10 say 'No people found.'
endif
EJECT
Release fcolhdr,fcolumn,actvname,curline,pagenum,beginng,mornames,fname,N
Release oth1,othf2,othheadr,xaddress
Set format to screen
RETURN
e to be printed in OTH field when not blank and matched
* MSEL - Selected report type: From SSSC or SP:ACTIVTY; with switint it as the
header plus print the sub-name from the code in the individual's
OTHER field, when he/she has this OTHER category name. For
example, entering "1/SCH" causes the "SCHool" header plus the
particular school name to be printed in this alternate field of the
report, but only when each individual has a "SCH=---" specified in
his/her OTHER field.
An additional characteristic is: the backward slash (\) en