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
 

 

Expanding only root segments from length 255 to 275

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Wed Sep 12, 2012 6:00 pm    Post subject: Expanding only root segments from length 255 to 275
Reply with quote

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
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1713
Location: UK

PostPosted: Wed Sep 12, 2012 6:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Wed Sep 12, 2012 7:00 pm    Post subject: Reply to: Expanding only root segments from length 255 to 27
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Sep 12, 2012 8:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Sep 12, 2012 8:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1713
Location: UK

PostPosted: Wed Sep 12, 2012 9:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Sep 12, 2012 9:10 pm    Post subject:
Reply with quote

Hello,

Depending on the volume of data, reading/writing individual entries may require an unacceptable amount of time/resources.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Wed Sep 12, 2012 9:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Thu Sep 13, 2012 11:49 am    Post subject: Reply to: Expanding only root segments from length 255 to 27
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 13, 2012 2:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Thu Sep 13, 2012 5:34 pm    Post subject: Reply to: Expanding only root segments from length 255 to 27
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Sep 17, 2012 4:39 pm    Post subject: Reply to: Expanding only root segments from length 255 to 27
Reply with quote

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 icon_sad.gif .

Looking at my DBD which has rule like
Quote:
RULES=(LLL,LAST)
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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts How to define PCB for paired segments ashok_uddaraju IMS DB/DC 4 Tue Jun 14, 2016 11:40 pm
No new posts File Manager with Variable Length File ahabib IBM Tools 10 Thu Mar 31, 2016 11:00 pm


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