Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

modifying the child record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO
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    Post subject: modifying the child record
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

Site Director


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

PostPosted: Sat Apr 17, 2010 9:49 pm    Post subject:
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    Post subject:
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    Post subject: Thanks..
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

Site Director


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

PostPosted: Fri Apr 23, 2010 9:26 pm    Post subject: Reply to: modifying the child record
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    Post subject: compiler settings
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

Site Director


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

PostPosted: Sat Jun 19, 2010 9:35 pm    Post subject: Reply to: modifying the child record
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    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 0 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us