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
 

 

Update salary of the employee with empno 1001

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
jose.jeyan

New User


Joined: 28 Jul 2006
Posts: 60
Location: Mumbai

PostPosted: Thu Aug 24, 2006 7:05 pm    Post subject: Update salary of the employee with empno 1001
Reply with quote

i have doubt with arrays

pls tell me this

i have declared an array which contains feilds like empno,name,sex,age,salary..etc

now i have entered the values for these feilds.

now i have to update salary of the employee with empno 1001 how can i do this .This is possible while using database.But is this possible using files,
how can i do this pls tell me in detail.

plss.. urgent
Back to top
View user's profile Send private message

prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Aug 24, 2006 7:12 pm    Post subject: Re: Regarding arrays
Reply with quote

You can search the array and when the idexed empno =1001 just move the new salary to the salary(same index). That will update the salary, if this is not what you are looking for let me know.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Aug 24, 2006 9:30 pm    Post subject:
Reply with quote

It's not clear what you want to do. You mention declaring an array which implies using a programming language (which one?). But then you mention using files which is different than using an array.

You need to explain more clearly what you want to do and how (arrays in what programming language? files using what utility?) you want to do it with.

An example of input and output would help.
Back to top
View user's profile Send private message
senman

New User


Joined: 17 Aug 2006
Posts: 17
Location: Chennai

PostPosted: Thu Aug 24, 2006 10:31 pm    Post subject:
Reply with quote

If you have your input in an array you can search for the empno in the array and update the salary.

Or if your input is a file.

1. Open the i/p file
2. read the record sequentially until End of File or match occurs
3. compare the empno
4. Update Salary.
5. Close the file
Am I answering your question?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
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 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 -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 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