.st0{fill:#FFFFFF;}

Fix RDI – Formatting Failed: No Model Available 

 January 24, 2021

By  NickLitten

IBM Rational Developer for IBM i

Trying to format your RPGLE source code and seeing “Formatting Failed: No Model Available”?

One of the nicest features of using RDI, compared to the old world of green screen SEU coding, is the ability to automatically format and tidy your program code.

Using the FORMAT CODE option in Rational Developer for IBM i (let’s just call it RDi from now on πŸ™‚ ) our source code will get nicely tidied, with SQL syntax being indented and common words case being applied, IF/ELSE/END loops will be indented, comments will be aligned and the whole program will generally be tidied and given a good old blast of housecleaning:

  • Source code is cleaner to read
  • Easier to see any logic flow problems while you are writing code
  • Nice to apply common layouts when writing multiple programs
  • Much easier to debug
  • and it makes Jesus/Mohammed/Thor happy πŸ˜‰

Example before RDi FORMAT

Fix RDI - Formatting Failed: No Model Available 1

Example after RDi FORMAT

Fix RDI - Formatting Failed: No Model Available 2
Applied the FORMAT CODE option – then I like to add a blank line between different code sections which allows my eye to scan the code quicker

ERROR MESSAGE — Formatting Failed: No Model Available

Quite simply – you are probably seeing this error because your outline view is turned off.

RDi needs the program outline to be able to format the code properly. The OUTLINE means it has scanned through the code and understands the syntax, confirms the syntax is correct (obviously bad syntax will mean bad reformatting right?)

You can turn it on manually by pressing the REFRESH button in your OUTLINE VIEW or, my recommendation is to turn on AUTOMATIC REFRESH in the settings.

Window > Preferences > Remote Systems > Remote Systems LPEX Editor > IBM i Parser > ILE RPG (or type ILE RPG into the shortcut in the preferences window)

Look near the bottom and you will see ‘Update the Outline View when text is changed in the editor’.

Fix RDI - Formatting Failed: No Model Available 3

Now you can see the outline view has not refreshed so click REFRESH for it to build. On some systems, this might take anything from a few seconds to many seconds to build, especially if you are working with a huge program, or a slow connection to your IBM i System.

The refresh status is always shown down on the bottom right of your screen (that little green bar):

snug cbd discount coupon 15% off

20% Off with Coupon: NICKLITTEN

I highly recommend the SNUG CBD Tincture to help keep you in the zone when programming!

In Partnership with SNUG CBD - American readers get 20% off

Fix RDI - Formatting Failed: No Model Available 4

When it has finished refreshing you will see the MOST EXCELLENT outline view telling you all kinds of things about your program:

Fix RDI - Formatting Failed: No Model Available 5

Now press REFRESH (CTRL – SHIFT – F) and *boom* it works!

RDi formatted code

If it doesn’t work – restart RDi and it will.


PS – This didnt work one time

So I did a JAVA UPDATE, rebooted and then it worked again.

Fix RDI - Formatting Failed: No Model Available 6

#weird.

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

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

Get In Touch

I’m always looking for awesome input, feedback and critique!

>