how would u write a programo achieve the following in Adabas Natural

please read the following specs:

Program Spec;

Please write a Natural program geared to run as a batch process. The program is to generate two reports, update the database Status file and generate an extract file.

Program Name: TESTWAGE

            Note:  Include Documentation in the program header

Update Requirement:

Update the LPO-PRIOR-LOAN-BAL and LPO-PMT-RCVD fields as follow

  1.        LPO-PRIOR-LOAN-BAL is the loan balance before current payment is applied.  Each time TESTWAGE program runs, this field is updated with LPO-PMT-RCVD.
    
  2.        LPO-PMT-RCVD is the current payment made by the member that should go against his/her loan balance. When step 1 is satisfied reset the LPO-PMT-RCVD field to 0. 
    
  3.        TESTWAGE program does not update the record when LPO-PMT-RCVD is negative instead report it in the exception report.
    

Extract Criteria

The Extract file (DSN not a temp) is for all members who have paid their dues, with LPO-PRIOR-LOAN-BAL = 0 after current payment has been applied. Extract file should contain SSN, LOAN-AMOUNT and the first 3 occurrences

of NOTIFY-MSG.

Report 1 Spec

Produce a report for wage history

Report Header footer information:

Header- Title: Member Wage History

            Report Date: Current date

Sub-header: Field Name

In the footer include page number

Report output fields:

SSN,

LOAN-AMOUNT,

Member’s age (calculated)

Display only the WHT-WAGE of the 15th year

Note: the 15th year wage is determined based on the following: WAGE-HISTORY-TABLE contains wages earned by members, for each year from the time he/she became a member using MEMBERSHIP-DATE.

Selection Criteria:

• Members who have paid their dues: DUES-ALL-PAID-IND = “Y”

• And who have LPO-PRIOR-LOAN-BAL = 0

?

Report 2 Spec

Produce an exception report

Report Header footer information:

Header - Title: Exception report

Sub-header: Field Name

In the footer include page number

Report output fields:

SSN,

LPO-PMT-RCVD,

Total Count of the exception records reported

Selection Criteria:

• LPO-PMT-RCVD is negative

JCL and Script Spec;

Produce JCL that will run program in Mainframe, as well as equivalent SCRIPT for UNIX execution.

Please write a NATURAL code according specs.

Do you really expect us to write the program for you ? I would suggest some education in Natural first, then maybe we can help you with any remaining questions. But if you get an education of any standard, you should be able to write such a program easily.

regards,
Ronald

This looks suspiciously like a job interview question.

If so, kudos to the company for covering the Natural basics in such a nice format.