Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
declaring file hierarchy and display stuff in data division: data division. FD inFile. 01 inRec. 03 employeeID pic x(4). 03 jobCode pic x. 03 empLastName pic x(14). 03 empFirstName pic x(14). 03 empStartDate pic x(8). 03 storeNo pic x(4). 03 weeklySalary pic 9(4)V9(2). 03 salesAmount pic x(8). FD salesReport. 01 salesRecord. 03 salesLastName pic x(14). 03 salesFirstName pic x(14). 03 filler pic x(4) value all spaces. 03 salesStoreNo pic x(4). 03 filler pic x(19) value all spaces. FD salaryExpenses. 01 expenseRecord. 03 salaryCat pic x(11). 03 filler pic x(3). 03 salaryTotal pic Z(4).9(2). 03 filler pic x(25). working-storage section. 01 ws-eof pic 9(4) value 0. 88 end-of-file value 1. 01 ws-record-count pic 9(4) value 0. 01 expenseTitle pic x(46) value "Salary expense for the week ending: 2020-10-24". 01 salesReportHeader. 03 reportTitle pic x(55) value "Employee recognition for the week ending: 2020-10-24". 03 dashLine pic x(44) value all '-'. 03 headings. 05 ln pic x(14) value "Last Name ". 05 fn pic x(14) value "First Name ". 05 store pic x(16) value " Store # ". -------------------------------------------------------------------------------------------------- in working storage: 01 expenseTitle pic x(46) value "Salary expense for the week ending: 2020-10-24". 01 salesReportHeader. 03 reportTitle pic x(55) value "Employee recognition for the week ending: 2020-10-24". 03 dashLine pic x(44) value all '-'. 03 headings. 05 ln pic x(14) value "Last Name ". 05 fn pic x(14) value "First Name ". 05 store pic x(16) value " Store # ". 01 blank-line pic x value " ". ------------------------------------------------------------------------------------------------- in prodecure division: once salesReport file is open: open output salesReport. write salesRecord from reportTitle. write salesRecord from dashLine. write salesRecord from headings. write salesRecord from dashLine. move all spaces to salesRecord. ((or else thing print with dashLine!) to write to salesReport: check-sales. if jobCode = 'S' AND salesAmount > 100000.00 move empLastName to salesLastName move empFirstName to salesFirstName move storeNo to salesStoreNo write salesRecord end-if. after file has finished reading: close inFile. close salesReport. open output salaryExpenses. write expenseRecord from expenseTitle. write expenseRecord from blank-line. write expenseRecord from "STORE #1:". move "Management:" to salaryCat. move store1-m-total to salaryTotal. write expenseRecord. move "Sales :" to salaryCat. move store1-s-total to salaryTotal. write expenseRecord. move "Admin :" to salaryCat. move store1-a-total to salaryTotal. write expenseRecord. move "Custodial :" to salaryCat. move store1-c-total to salaryTotal. write expenseRecord. write expenseRecord from blank-line. write expenseRecord from "STORE #2:". move "Management:" to salaryCat. move store2-m-total to salaryTotal. write expenseRecord. move "Sales :" to salaryCat. move store2-s-total to salaryTotal. write expenseRecord. move "Admin :" to salaryCat. move store2-a-total to salaryTotal. write expenseRecord. move "Custodial :" to salaryCat. move store2-c-total to salaryTotal. write expenseRecord. write expenseRecord from blank-line. write expenseRecord from "STORE #3:". move "Management:" to salaryCat. move store3-m-total to salaryTotal. write expenseRecord. move "Sales :" to salaryCat. move store3-s-total to salaryTotal. write expenseRecord. move "Admin :" to salaryCat. move store3-a-total to salaryTotal. write expenseRecord. move "Custodial :" to salaryCat. move store3-c-total to salaryTotal. write expenseRecord. close salaryExpenses.
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)