1 2 Previous Next 16 Replies Latest reply on Jan 27, 2016 8:30 PM by Prasanna cuddalore

    BMC hd unload/reload header , trailer format

    Prasanna cuddalore

      Hi,

      Is there any documentation available on the formats of the meader and trailer of the ims unload dfsurg1 file, when unloaded in long format..

       

      Another question is , are the header and trailer required for a reload

       

      Thanks

        • 1. Re: BMC hd unload/reload header , trailer format
          Fred Novakov

          Hello,

           

          Yes this is documented in the MAXM Reorg Solutions for IMS User Guide.   This manual can be found at the BMC website.   www.bmc.com       When you specify DFSURGU1(LONG), the Unload function writes a variable-length record for each retrieved database segment containing the data fields. For full function databases, the unload record format is described in the DFSURGUF macro in your GENLIBB. For HALDB partitioned databases, the unload record format is described in the DFSURGUP.

           

          Yes to perform an IMS utility RELOAD the header and trailer records are required.

           

          Regards,

          Fred.

          • 2. Re: BMC hd unload/reload header , trailer format
            Prasanna cuddalore

            Hello Fred, thank you for responding to me. I had a question for the db2 loadplus that did not get any attention for months, obviously ims support seems better!!

             

            My question was about the first few header and last trailer records and not the prefix found in every data segment..the issue I am facing is I need to unload segments from one Db, modify them and the load to another database. The initial header and trailer records are coming in my way as I am not sure how to populate them.

             

            The hdsort does not seem to care about the header and trailer, so was wondering if reload would work without the header records and trailer. Please note I am preserving the headers/prefixes found in each segment..

             

            Thank you for your response

            • 3. Re: BMC hd unload/reload header , trailer format
              Fred Novakov

              You are welcome and of course IMS is better than DB2. 

               

              So you want to unload a database, modify some segment data, and then reload the modified data into another database.     Are you trying to do this with an application program and that is why the header and trailer records are causing you issues?

               

              If you own the BMC IMS utilities, which I assume you do based on your initial question, you should look at using an unload user exit routine.    This is also documented in the MAXM Reorg Solutions for IMS User Guide Appendix E.   There are sample assembler, PLI and COBOL programs that can easily be modified to change or delete segments as they are unloaded or reloaded depending on the utility.

               

              Hope this helps,

              Fred.

              • 4. Re: BMC hd unload/reload header , trailer format
                Duane Wente

                Hi Prasanna,

                 

                The BMC Header and Trailer record formats are not provided because they are proprietary.  The BMC utilities use the header and trailer records extensively to insure that the resultant database is reorganized correctly.

                 

                My suggestion is that you use that BMC Unload API to manipulate the database segments with your DLI application program.  The benefit is that BMC’s high speed sequential I/O access is used in conjunction with your application program to condition the BMC unload file prior to executing BMC’s reload.  You can find documentation on how to use the API (Application Program Interface) in the “MAXM Reorg Solution for IMS User Guide, Chapter 6 Unload Function, API sub-section.  Using the BMC Unload Function API will insure that the header and trailer records are constructed correctly for BMC’s Reload Function.

                 

                Best regards,

                --

                Duane Wente

                Advisory Software Consultant

                ZSolutions Optimization (ZSO)

                BMC Software, Inc.

                 

                Mail       duane_wente@bmc.com<mailto:duane_wente@bmc.com>

                Direct:   713-918-4677

                Mobile: 713-705-6796

                • 5. Re: BMC hd unload/reload header , trailer format
                  Prasanna cuddalore

                  Hello Duane, Fred

                  Thank you so much for your responses. Apologies for my verbosity but wanted to get your expert opinion

                   

                  1. I do understand that based on this that the header and trailer are essential for the RELOAD function and the RELOAD would not work without them. However the HDSORT does not need the header and the trailer. Is this true? I researched the use of USERHDR but it has constraints that come in my way.

                  2.  My problem is that once I unload a database, say X with all its sgements, then modify it, I need to use this data to load into a different databases, say X,Y,Z depending on the contents of the data.

                  Then similarly, there is another Database Y, which i need to unload, modify and then reload to either X,Yor Z depending on the contents of the data. (same case for DB Z which needs to go to either X,Y or Z). So

                  a)Can my unload user exit or API open and write the segments to different files?

                  b)If So, will BMC add the header/trailer for each of the files that are written out during the processing of a DB(for example when processing DB X, will it write out the header/trailer for files X,Y,Z?

                  c) How do I concatenate the individual files from the output from each DB unload as I need to put the X segment records together from X,Y,Z into one file

                  d) Can i take the header/trailer from X, add all the segments that should go into this X DB and would that file then be RELOAD'able?

                   

                  3.The other option is to have a regular DL/I program that reads the unload file and does ISRT calls , this is the least preferred option as this would be quite slow for the DB's we are dealing with. I also see that we could also use the API during the Load which is similar to the DL/I prgram but was curious to know the performance improvement it can bring

                  4. Finally, can the API / user exit be coded in C/C++ to run within Language Environment.

                   

                  Thank you so much

                  Regards

                  Prasanna

                  • 6. Re: BMC hd unload/reload header , trailer format
                    Duane Wente

                    Hi Prasanna,

                     

                    Use the following procedure to get the 3 target databases X, Y, and Z reloaded:

                     

                    1.      Use MAXM Reorg Unload Function with 3 user exits, 1 for each target database (X, Y, and Z)

                     

                    Results in 9 unloads: 3 for DB X, 3 for DB Y, and 3 for DB Z

                     

                    2.      Concatenate the three unloads for each target DB into HDSORT

                    HDSORT will put all the unload headers in the front, segment data, and all the trailers at the end of the sorted unload file

                     

                    3.      Use MAXM Reorg Reload Function to load the 3 target databases with the HDSORT unload files (after looking at the code we believe the invalid header and trailer records will be ignored, you might get some informational messages but reload should run to completion)

                     

                    4.      Run BMC POINTER CHECKER PLUS against the 3 target databases to gather validation statistics

                     

                    Regards,

                    --

                    Duane Wente

                    Advisory Software Consultant

                    ZSolutions Optimization (ZSO)

                    BMC Software, Inc.

                     

                    Mail       duane_wente@bmc.com<mailto:duane_wente@bmc.com>

                    Direct:   713-918-4677

                    Mobile: 713-705-6796

                    • 7. Re: BMC hd unload/reload header , trailer format
                      Duane Wente

                      Hi Prasanna,

                       

                      Use the following procedure to get the 3 target databases X, Y, and Z reloaded:

                       

                      1.      Use MAXM Reorg Unload Function with 3 user exits, 1 for each target database (X, Y, and Z)

                       

                      Results in 9 unloads: 3 for DB X, 3 for DB Y, and 3 for DB Z

                       

                      2.      Concatenate the three unloads for each target DB into HDSORT

                      HDSORT will put all the unload headers in the front, segment data, and all the trailers at the end of the sorted unload file

                       

                      3.      Use MAXM Reorg Reload Function to load the 3 target databases with the HDSORT unload files (You will need to add an as yet undocumented option HDRDSNCK(N) on the RELOAD control card to bypass the invalid header and trailer records)

                       

                      4.      Run BMC POINTER CHECKER PLUS against the 3 target databases to gather validation statistics

                       

                      Regards,

                       

                      --

                      Duane Wente

                      Advisory Software Consultant

                      ZSolutions Optimization (ZSO)

                      BMC Software, Inc.

                       

                      Mail       duane_wente@bmc.com<mailto:duane_wente@bmc.com>

                      Direct:   713-918-4677

                      Mobile: 713-705-6796

                      • 8. Re: BMC hd unload/reload header , trailer format
                        Prasanna cuddalore

                        Hello Duane,

                         

                        WOW!! Thank you so much for the excellent solution that you have given. This will be a great help for us. My sincere thanks to the effort you have put into to find a solution for me!

                         

                        I will try out the solution in consultation with the DBA and will let you know the results. I do hope that this method will give me the best performance throughput possible with the super efficient BMC utilities. I am not that familiar with the Pointer Checker utility, hope that will run efficiently as well..

                         

                        Again, thank you for your efforts and the excellent solution

                         

                        Thanks

                        Prasanna

                        • 9. Re: BMC hd unload/reload header , trailer format
                          Prasanna cuddalore

                          Hello Duane

                          I tried the Reload as you suggested for a non-partitioned database and it worked like a charm.

                           

                          The load was successful with just some warnings about invalid header records and it did not seem to care about the trailer at all. This was the same result with either HDRDSNCK(N) or without it. Maybe we are not at the latest release..

                           

                          Thank you once again!

                          Prasanna

                          • 10. Re: BMC hd unload/reload header , trailer format
                            Duane Wente

                            Prasanna,

                             

                            Glad that I was able to provide a solution for you.  Did you run a pointer validation against the reloaded databases?  That will insure that the databases don’t have any pointer errors and you will also get segment statistics that can be validated.

                             

                            I expected you to get the informational messages about the invalid header records.

                             

                            Best regards,

                            Duane Wente

                             

                            --

                            Duane Wente

                            Advisory Software Consultant

                            ZSolutions Optimization (ZSO)

                            BMC Software, Inc.

                             

                            Mail       duane_wente@bmc.com<mailto:duane_wente@bmc.com>

                            Direct:   713-918-4677

                            Mobile: 713-705-6796

                            • 11. Re: BMC hd unload/reload header , trailer format
                              Prasanna cuddalore

                              Hello Duane,

                               

                              Thanks for the follow-up, yes i ran the pointer checker and it came out clean.

                              Hopefully, it will work the same when i load to partitioned Databases which is next on my list to try out!

                               

                              Thanks Again!

                               

                              Prasanna

                              • 12. Re: BMC hd unload/reload header , trailer format
                                Duane Wente

                                Hello Prasanna,

                                 

                                Do you have access to BMC’s MAXM Database Advisor for IMS?  It provides HALDB migration, and partition rebalancing workflows that lead you thru the conversion process creating the DBRC partition specifications, IDCAMS/OSAM dataset allocation, and MAXM database reorganization job stream to implement the desired HALDB database.

                                 

                                We also provide another partitioning alternative that does not require you to alter the DB access method from HDAM or HIDAM and at the same time supports up to 127 partitions per database.  There would be not application changes, or JCL changes to implement.  This partitioning alternative is Partition Database Facility (PDF).

                                 

                                Regards,

                                Duane Wente

                                 

                                --

                                Duane Wente

                                Advisory Software Consultant

                                ZSolutions Optimization (ZSO)

                                BMC Software, Inc.

                                 

                                Mail       duane_wente@bmc.com<mailto:duane_wente@bmc.com>

                                Direct:   713-918-4677

                                Mobile: 713-705-6796

                                • 13. Re: BMC hd unload/reload header , trailer format
                                  Prasanna cuddalore

                                  Thanks for the information Duane, I will keep this in mind, but this is not one of my immediate requirements

                                   

                                  Thanks

                                  • 14. Re: BMC hd unload/reload header , trailer format
                                    Prasanna cuddalore

                                    Hi Duane,

                                    I am facing an issue in the load as my I have altered the keys in the dependents and now need to sort the dependents into the right order. HDSORT is only sorting the roots but not the children.

                                    Are you aware of any workarounds that can be employed to get over this situation

                                     

                                    Thank you

                                    1 2 Previous Next