View previous topic :: View next topic
|
Author |
Message |
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
hi All,
I have a IMS file with following structure.
Code: |
LEVEL SEGMENT Length
1 VACODTA 255
2 VACORPT 1000
1 VACODTA 255
1 VACODTA 255
1 VACODTA 255
2 VACORPT 1000
|
The requirement is to expand the tax rates on the VACODTA segments from 3 to 5 decimals, due to this the VACODTA segment length will have to be increased from 255 to 275. Basically all VACODTA segments should be expanded.The IMS structure after conversion should look like
Code: |
LEVEL SEGMENT Length
1 VACODTA 275
2 VACORPT 1000
1 VACODTA 275
1 VACODTA 275
1 VACODTA 275
2 VACORPT 1000
|
i have written a cobol-ims conversion program using two copybooks NEWCPY - length 275 and OLDCPY - length 255. I have a DBDLIB on which the Segment VACODTA has been made to 275 bytes which im using in the jcl. Following is the logic i have followed -
1. First Call is an Unqualified GHU call using SSA 'VACODTA ' and fetched first VACODTA segment to OLDCPY.
2. Moved Variables from OLDCPY to NEWCPY.
3. Replace call "REPL" using NEWCPY. First segment got expanded.
4. Step 4,5,6 In loop, im giving an Unqualified GHN call using SSA 'VACODTA ' and fetched next VACODTA segment to OLDCPY.
5. Moved Variables from OLDCPY to NEWCPY.
6. Replace call "REPL" using NEWCPY. second segment got expanded.
==> when it tries GHN call for the next time, im getting abend U0853.
I did search for the U0853. It talks about the segment loaded with the last DBD. i couldnot figure it out.
Is there anything wrong with the process of Conversion program?
Following are the DFS messages
Code: |
+DFS671I QHST2013.STEP10. - FOR THIS EXECUTION, DBRC IS SET TO YES T130
+DFS194W - DATA BASE VACOTI REFERENCED BY PSB QUUCOCNV IS NOT REGISTERED WITH DBRC. T130
+DFS3341I - DATA BASE VACOTP IS USING DATA SETS NOT REGISTERED WITH DBRC T130
+DFS2208I SINGLE LOGGING IN EFFECT ON IMS DATA SET T130
+DFS2207I IMS LOG(S) BLOCKSIZE=06144, BUFNO=0002 T130
+DFS2216A MONITOR ACTIVE, MODIFY TO STOP MONITOR
+DFS035I BATCH INITIALIZATION COMPLETE T130
+DFS0832I ABEND U0853 REASON CODE N/A DATABASE VACOTP T130
+DFS629I IMS BATCH REGION ABEND- IMS 0853 T130
+DFS629I PSW AT ERROR = 078D1000 8006D91C T130
+DFS092I IMS LOG TERMINATED T130
+DFS036I BATCH BACKOUT IS REQUIRED FOR QHST2013 T130
|
please shed some light on this.
Thanks & Regards,
Rakesha H G |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
You are trying to access the same database in 2 different formats at the same time? I belive the usual route to convert a DB is to read the old DB wrting the unloaded segments in the new format the load the data to the new DB with the new DBD. Once everything is hunky-dory - delete the old DB. |
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
thanks for the reply Nic, Yes i tried to access same DB in 2 different formats {novice IMS guy ... i wouldnt get great ideas}
My DBA was suggesting me this ... "Since IMS database is hierarchical. It contains pointers in the segments. UACOTP is a HIDAM database which means it has a Hierarchical Index database (UACOTI) that points to the root-database (see attached). That why you have to use an unload-JCL to unload the segments using the old DBDLIB to a flat-file (without the pointers), then do the data-conversion, then re-load it to the new DBDLIB"
Will this work too? I have two files which i use in FAIMS, which one should i unload and can i use UNload/EXTRACT option of FAIMS?
Any sample jcls to do this will be helpful. Unfortunately my DBA or shop doesnt have one.
Since im very new to IMS .... looks like i will have a good time |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Rakesha - you're mixing your concerns with good amount of local jargons. I'll assume by FA-IMS you mean "File-Aid for IMS". If yes, you can use "unload option" but then it'll give a format which File-Aid understand not the COBOL program which you've mentioned in first post of yours.
How do you make sure that before this
Quote: |
when it tries GHN call for the next time, im getting abend U0853 |
previous twoo CALLs were successful?
And are you sure new DBD is not referring to new DB? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Not sure where you are wioth this, but one method that has worked on many, many database systems is to:
1. Backup the test database(s) to be changed.
2. Stop all use of the test databse(s).
3. Unload the data.
4. Modify the data per the 2 copybooks.
5. Remove the old "ddl" and catalog the new ddl.
6. Load the reformatted data.
7. Check for any problems.
When the procedure is validated in test, schedule when this can be done in Production. The testing should include full volume as you need to be able to predict how much time is needed for Production. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
I let it slide re JCL etc but really just unload using your cobol program modified to only read and write to file and then another version modified to read the file and write to the new DB |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Depending on the volume of data, reading/writing individual entries may require an unacceptable amount of time/resources. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
And do remember to add some extra space in the VACODTA segment so that the next time you need to increase a field size (and there *will* be a next time) or add a new field, the conversion will be relatively painless. |
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
hi All,
Thanks for your time and replies.
I was able to Extract the data using "File aid - IMS option" and also i could do the same extract using a jcl with
Code: |
//STEPUNLD EXEC PGM=DFSRRC00,REGION=2048K,
// PARM='ULU,DFSURGU0,VACOTP,,,,,,,,,,Y'
|
I see there are no differences in data with respect files created from above two (only length of the extracted files differ). Can i use the output of the file extracted using "File aid - IMS option" to run my conversion and load it back?
P.S. - I am still looking at how i can load back the data. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Quote: |
I see there are no differences in data with respect files created from above two (only length of the extracted files differ). Can i use the output of the file extracted using "File aid - IMS option" to run my conversion and load it back? |
why not try it and see yourself, what happens? |
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
Anuj,
Quote: |
P.S. - I am still looking at how i can load back the data. |
i was still looking at loading at that time. Now i know it does work.
I'm in middle of implementing Dick's suggestion. Currently in step 4 Trying to convert the flat file. I will post back with updates.
Thanks for your time. I have new found respect for IMS. Its never too late to learn |
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
hi All,
Just finished loading the DB with the Converted file.
One thing i observed was my converted record (275 length) had valid data till the last byte, but when i reloaded this file to IMS DB using my new expanded DBD - Data seems to fine for the first 255 bytes (which was the original length of unload) and starting 256 - 20 bytes of low values have been initialized .
Looking at my DBD which has rule like
makes sense to me. I'm not understanding why it wont pick up my 275 byte converted record?? any suggestions.
Note: Thought this will help someone. Unload of DB to a tape file and Reload also using the tape file. My jobs abended in reload for not using the tape file. |
|
Back to top |
|
|
|