IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

modifying the child record


IBM Mainframe Forums -> IDMS/ADSO
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Sat Apr 17, 2010 1:08 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 17, 2010 9:49 pm
Reply with quote

Hello,

Suggest you post what you have so someone can determine what needs to be changed.
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Mon Apr 19, 2010 4:16 pm
Reply with quote

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
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Fri Apr 23, 2010 9:04 pm
Reply with quote

Thanks all who have ever thought abt this also...

I did it successfully...


Thanks,
Kcs
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 23, 2010 9:26 pm
Reply with quote

Good to hear you found a solution - thank you for letting us know icon_smile.gif

What was the fix?

The answer may help someone with a similar question one day. . .

d
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Sat Jun 19, 2010 7:42 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jun 19, 2010 9:35 pm
Reply with quote

Thanks for the followup icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IDMS/ADSO

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top