Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
sunbelt-plb-samples/legacy_demo/chkcat.inc at main · KcsDev1982/sunbelt-plb-samples · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
KcsDev1982
/
sunbelt-plb-samples
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
main
Breadcrumbs
sunbelt-plb-samples
/
legacy_demo
/
chkcat.inc
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
172 lines (160 loc) · 6.41 KB
main
Breadcrumbs
sunbelt-plb-samples
/
legacy_demo
/
chkcat.inc
Copy path
Top
File metadata and controls
Code
Blame
172 lines (160 loc) · 6.41 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
*****************************************************************************
.Catagory configuration routines
.
.
********************************
.EdtCatDesc
.EdtCatAcode
.EdtCatNcode
.CatSummary
Dcatdesc AFILE
*
.Dcatdesc is
30
byte records
.
catrcrd LIST
catdesc DIM ^
20
cat2desc DIM
2
catcode FORM
2
catreserv DIM
6
;reserved
LISTEND
NxtCatCode FORM
2
#
d10 DIM ^10
#
d40 DIM ^40
#
d50 DIM ^50
#
f4 FORM 4
#
mod FORM 1
StartCat
CLEAR ftrap
TRAP noFile IF IO
OPEN Dcatdesc,catagories
IF (ftrap)
PREP Dcatdesc,catagories,catagories,
"
U,1-20,21-22,23-24
"
,
"
30
"
MOVE
"
Default
"
,catdesc
MOVE
"
df
"
,cat2desc
SET
catcode
WRITE Dcatdesc;catrcrd
ENDIF
TRAPCLR IO
CALL LoadCat
RETURN
CatAdd
SETPROP BdgModBtn,ENABLED
=
0
GETITEM EdtCatDesc,
0
,
#
d40
CHOP
#
d40,#d40
RETURN IF (
#
d40="")
GETITEM EdtCatAcode,
0
,
#
d10
CHOP
#
d10,#d10
RETURN IF (
#
d10="")
CALL StripLeadingSpcae USING
#
d10
CALL StripLeadingSpcae USING
#
d40
MOVE
#
d40,Catdesc
MOVE
#
d10,Cat2desc
MOVE NxtCatCode,catcode
INCR NxtCatCode
PACK
#
d10,"02X",Cat2desc
READ Dcatdesc,
#
d10;#d50
IF OVER
WRITE Dcatdesc;catrcrd
ELSE
ALERT note,
"
Alpha code already exists
"
,
#
f4,"Error"
RETURN
ENDIF
PACKKEY
#
d50,catrcrd
CatSummary
.
AddString
USING
#
d50
INSERTITEM CCode,
99
,catdesc
CLEAR
#
d10,#d40
SETITEM EdtCatDesc,
0
,
#
d40
SETITEM EdtCatAcode,
0
,
#
d10
RETURN
CatSMod
CALL bdgModCncl
CALL AcntCnl
CatSummary
.
GetCaretIndex
GIVING
#
f4
CatSummary
.
GetText
GIVING
#
d50 USING #f4
CHOP
#
d50,#d50
UNPACK
#
d50,catrcrd
CHOP CatDesc,CatDesc
CHOP Cat2Desc,Cat2Desc
SETITEM EdtCatDesc,
0
,CatDesc
SETITEM EdtCatAcode,
0
,Cat2Desc
PACK
#
d50,"01X",CatDesc
READ Dcatdesc,
#
d50;catrcrd
SET
#
mod
SETPROP CatSummary,ENABLED
=
0
SETPROP CatModBtn,ENABLED
=
1
MOVE
"
Cancel
"
,
#
d10
SETITEM CatRmBtn,
0
,
#
d10
SETFOCUS EdtCatDesc
RETURN
CatMod
GETITEM EdtCatDesc,
0
,
#
d40
CHOP
#
d40,#d40
RETURN IF (
#
d40="")
GETITEM EdtCatAcode,
0
,
#
d10
CHOP
#
d10,#d10
RETURN IF (
#
d10="")
CALL StripLeadingSpcae USING
#
d10
CALL StripLeadingSpcae USING
#
d40
MOVE
#
d40,Catdesc
MOVE
#
d10,Cat2desc
UPDATE
Dcatdesc;catrcrd
PACKKEY
#
d50,catrcrd
CatSummary
.
GetCaretIndex
GIVING
#
f4
CatSummary
.
DeleteString
USING
#
f4
CatSummary
.
InsertString
USING
#
d50,#f4
CatCnl
SETPROP CatSummary,ENABLED
=
1
SETPROP CatModBtn,ENABLED
=
0
MOVE
"
Remove
"
,
#
d10
SETITEM CatRmBtn,
0
,
#
d10
CLEAR
#
d10,#d40,#mod
SETITEM EdtCatDesc,
0
,
#
d40
SETITEM EdtCatAcode,
0
,
#
d10
RETURN
CatRm
IF (
#
mod)
CALL CatCnl
RETURN
ENDIF
CatSummary
.
GetCaretIndex
GIVING
#
f4
CatSummary
.
GetText
GIVING
#
d40 USING #f4
UNPACK
#
d40,catrcrd
CHOP CatDesc,CatDesc
PACK
#
d40,"01X",CatDesc
READ Dcatdesc,
#
d40;catrcrd
DELETE
Dcatdesc
CatSummary
.
DeleteString
USING
#
f4
CatSummary
.
SetCurSel
USING
#
f4
SETPROP BdgModBtn,ENABLED
=
0
RETURN
LoadCat
.
****
LOAD Dynamic catagory discriptions
AND
expence summary LV
****
DELETEITEM CCode,
0
DELETEITEM BCode,
0
CLEAR descCnt
SET
NxtCatCode
REPOSIT Dcatdesc,ZERO
TRAP nothing noreset IF IO ;just read passed deleted records
LOOP
READ Dcatdesc,seq;catrcrd
BREAK IF OVER
IF (catcode
=
NxtCatCode)
INCR NxtCatCode
ENDIF
PACKKEY
#
d50,catrcrd
CatSummary
.
AddString
USING
#
d50
CHOP catdesc,catdesc
LVExpence
.
InsertItem
USING catdesc,
9999
INSERTITEM CCode,
99
,catdesc
INSERTITEM BCode,
99
,catdesc
INCR descCnt
BREAK IF (descCnt
>
"
50
"
)
REPEAT
TRAPCLR IO
RETURN
#
Fp FORM ^
getcat ROUTINE
#
Fp
MOVE
#
fp,catcode
PACK
#
d40,"03X",catcode
READ Dcatdesc,
#
d40;catrcrd
CHOP catdesc,catdesc
RETURN
You can’t perform that action at this time.