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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am


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