View previous topic :: View next topic
|
Author |
Message |
kcs4u2004 Warnings : 1 New User
Joined: 21 Apr 2008 Posts: 56 Location: Chennai
|
|
|
|
I have two IDMS records employee and salary .employee is the parent and salasry is the child.I know 100 employee numbers and giving input in a dataset. I want to change their salsry as "50000".how can i do.
Area:EMPLOYEE-SALARY
its simple and just max 5 to 6 lines of code also for modifying the filed.
I wrote it ,bt its not showing any error but not updating..
can someone please write those lines..
Thanks,
Kcs |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post what you have so someone can determine what needs to be changed. |
|
Back to top |
|
|
kcs4u2004 Warnings : 1 New User
Joined: 21 Apr 2008 Posts: 56 Location: Chennai
|
|
|
|
Hi,
I have written this code..
READ IN-FILE AT END MOVE 'Y' TO WS-EOF.
MOVE WS-EMP-NUM TO A111-EMP-NUM.
OBTAIN CALC EMPLOYEE
ON DB-END-OF-SET
DISPLAY 'EMP NOT FOUND - ' WS-EMP-NUM
END-IF.
IF DB-STATUS-OK
OBTAIN SALARY WITHIN EMPLOYEE-SALARY
MOVE 50000 TO A222-SAL
MODIFY SALARY
ELSE
DISPLAY 'EMP NOT FOUND - ' A111-EMP-NUM
END-IF.
fyi A222-SAL is not the primary key for SALARY record,its a normal field .but for EMPLOYEE record A111-EMP-NUM is the key..
Thanks,
Kcs |
|
Back to top |
|
|
kcs4u2004 Warnings : 1 New User
Joined: 21 Apr 2008 Posts: 56 Location: Chennai
|
|
|
|
Thanks all who have ever thought abt this also...
I did it successfully...
Thanks,
Kcs |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear you found a solution - thank you for letting us know
What was the fix?
The answer may help someone with a similar question one day. . .
d |
|
Back to top |
|
|
kcs4u2004 Warnings : 1 New User
Joined: 21 Apr 2008 Posts: 56 Location: Chennai
|
|
|
|
The same code only worked..as it was Pack on..so the compiler error I was getting..just in profile I did pack off,and I compiled and ran,it worked fine.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thanks for the followup
d |
|
Back to top |
|
|
|