June 11

0 comments

Turnover Tip – Checkout to new library retaining source line changes dates

By NickLitten

June 11, 2018

Turnover

Turnover Tip Tuesday

Wow – that’s another long URL title. I really wanted to call this “How To Check Out An Object From One Library And Promote It To A Different Library but keep the program source code line change dates” but that just seemed too ridiculously long.

Why are we talking about this?

We all know there are several ways to copy a source member from one file to another but did you know that HOW you execute the copy can make a BIG difference?

The technique used to copy a source member can cause a complete reset of all the source line change dates. In theory, all source modifications are supposed to be documented in the code itself but everyone knows it doesn’t always happen. When there aren’t adequate mod markings we rely on those line dates to help decipher what changes have taken place in the source code and when. In some source members, losing those dates is disastrous. Here is an example:

The WRONG way:

  1. Add the object to your worklist using the app that corresponds to your NEW target library
  2. Check out the object at the production level using option 21 — No source will be copied from the new production library to your programmer library because it won’t exist there yet
  3. Use option 32 from the worklist (at the programmer level) to open the source for edit
  4. Use F15 to browse a different source member — Set COPY ALL RECORDS to Y and then Enter the object’s OLD source library and file name and press ENTER to see that source on SEU’s split screen
  5. Type an A (for after) and ENTER in the sequence number column on the first line in the source file so SEU will know where to place all the copied source lines
  6. Press F12 to remove the split screen
  7. Window to the right of the source file about 50 characters and you will see that all the date information from the original source file has been replaced with the current date
Source copied in using seu resets and loses the line change dates

UHOH – so allthough this works we lose all our line change dates. hashtag thats not good.

The RIGHT way:

  1. Add the object to your Turnover worklist using the application that corresponds to your NEW target library
  2. Check out the object at the production level using option 21 — No source will be copied from the new production library to your programmer library because it won’t exist there yet
  3. Use F20 from the worklist display to STRPDM
  4. Select option 3 to work with members — Enter the OLD target source library and source file name to find the object’s source
  5. Locate the source in the member list and select option 3 to copy the source member — Enter your programmer library and source file name as the target and press ENTER to execute the copy
  6. Exit PDM to return to your worklist and use F5 to refresh — Now you should see a Y in the SRC column at the development (programmer) level
  7. Using option 32/35 from the worklist (at the programmer level), verify that the source line dates were not reset during your initial copy from the old production source library.
Turnover tip - checkout to new library retaining source line changes dates 1
Turnover tip - checkout to new library retaining source line changes dates 2

Bobs yer Uncle and Fanny’s yer Aunt.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>