View previous topic :: View next topic
|
Author |
Message |
Suceender Kumar
New User
Joined: 10 Jan 2008 Posts: 29 Location: Chennai, India
|
|
|
|
Hi,
We have a screen to enter employee details in online. Now another department employees were need to be added in our department. For example, in the other department we have around 500 employees were to be added here and we are finding a way to enter this data in our screen by means of some process instead of manual entry through screen.
I have come up with an idea of entering through a file. The data has to be stored in a VSAM file and this VSAM file will be after the Map RECEIVE command. So it will read sequentially and populate the map variable, process the data and loop until it process all the data. Then the SEND map will be triggered once all the data is processed. Any error by means of edit check will stop the process.
EXEC CICS RECEIVE
END-EXEC
EXEC CICS STARTBR FILE(….)
END-EXEC
EXEC CICS READNEXT FILE(…)
END-EXEC
……..
………
……..
EXEC CICS SEND MAP(….)
END-EXEC.
From READNEXT through before the SEND map will be in loop and the successful process of data in the input file will be deleted. So in a single transaction this BULK data will be uploaded. Is it a good way to do this?
Any other efficient way to achieve this? |
|
Back to top |
|
|
Stefan
Active User
Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
Suceender Kumar wrote: |
Is it a good way to do this? |
NO
I assume the final outcome of your process will be set of employee data stored in a VSAM data set or DB2 tables which will include entries from the new department too. So why don't you populate the data store by technical means designed for these kind of bulk data processing? Create a batch job using REPRO (if it's a VSAM file) or a load utility like DSNUTILB (if it's a DB2 table).
NEVER EVER use an online transaction to do a mass update. Full stop. |
|
Back to top |
|
|
Suceender Kumar
New User
Joined: 10 Jan 2008 Posts: 29 Location: Chennai, India
|
|
|
|
Finally it will store in DB2. The data has to pass some edit checks, cross reference from other tables and if the data passes all the edit check then only it has to store in DB2. It quite tricky in bringing the whole online process to batch. That’s why I am finding an alternate solution. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
You requirement doesnt explain much on what is actually needed and what you have done?
Also FYI CICS doesn't store data of files or tables
But just An Interface |
|
Back to top |
|
|
Suceender Kumar
New User
Joined: 10 Jan 2008 Posts: 29 Location: Chennai, India
|
|
|
|
In Simple words, we need to add around 500 employee records through online screen, which passes through edit checks, cross reference tables and finally store it in a DB2 table. Since we have 500 records to be inserted, client finds it difficult to enter through screen. So is there any alternate solution available? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Pass the data to the copybook or commarea and call the CICS module throguh EXCI from Batch?
Or Try to recreate a Batch version of the CICS code to validate and load to DB2 (If time permits)
or Convert the data to vsam file format and read the VSAM file and process in CICS ? |
|
Back to top |
|
|
Suceender Kumar
New User
Joined: 10 Jan 2008 Posts: 29 Location: Chennai, India
|
|
|
|
Quote: |
Pass the data to the copybook or commarea and call the CICS module throguh EXCI from Batch? |
Could you please provide some example or the document link for reference? I was not aware of this option.
Quote: |
Try to recreate a Batch version of the CICS code to validate and load to DB2 (If time permits) |
We have 14 screens like this to do and the time constraints
Quote: |
Convert the data to vsam file format and read the VSAM file and process in CICS ? |
This was the option i was trying to explain in my initial message. By storing the data in VSAM file and populating the variables.
Thanks for all your inputs. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
It quite tricky in bringing the whole online process to batch. That’s why I am finding an alternate solution. |
To do what you want/need, there is no reason to bring the "whole online process" to batch.
I believe you have more than this alternative.
One way would be to do as suggested and use EXCI to invoke CICS code.
Another would be to copy the data to a sequential file, edit it by cloning the online edits to bacth code (also suggestes) or possibly using Sort to edit (depends on complexity), and format the data for loading directly into DB2. |
|
Back to top |
|
|
Suceender Kumar
New User
Joined: 10 Jan 2008 Posts: 29 Location: Chennai, India
|
|
|
|
Thanks everyone for the valuable inputs!!! |
|
Back to top |
|
|
|