Solved

How to write in pogram instruction for the compiler?

Posted on 2010-09-22
6
1,167 Views
Last Modified: 2013-12-06
Hi,
In my RPGLE program, when I compile it
with option 14 and then F4,
I change the parameter value ->ALWNULL        *Yes
How can I do to write in the body of my program
this instruction to the compiler?
thanks      
0
Comment
Question by:bobdylan75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Expert Comment

by:tliotta
ID: 33737765
You haven't told us what version of i5/OS nor which RPG compiler you are using. I'll assume that the compiler is RPG/400.

If the specification is required in the program source, then convert the source to RPG IV (which probably should be done anyway). In RPG IV, you can use ALWNULL(*INPUTONLY) as a H-spec option. Specifying ALWNULL(*YES) on the command gives the same result as ALWNULL(*INPUTONLY).

If you don't convert to RPG IV, you can't use anything in the program source for this without purchasing (or otherwise obtaining) a pre-processor that might modify the compile command to force ALWNULL(*YES).

I'm not directly familiar with any such pre-processor, but internet searches should locate any that might exist.

Technically, you could probably create one yourself. It might simply read your source member and generate a compile command based on comments that you place in the source; or you might use the various pre-processor APIs to enforce your standard. (But I believe the pre-processor APIs are only used for modules, so you'd need to convert to RPG IV anyway.)

Tom
0
 

Author Comment

by:bobdylan75
ID: 33741620
I'm using v5r3m0
I use the standard compiler for that.
With option 14 in STRPDM.
When I tell RPGLE I tell RPG IV.
RPGLE = ILE RPG = RPG IV
0
 
LVL 35

Accepted Solution

by:
Gary Patterson earned 500 total points
ID: 33749386
In V5R3 ILE RPG, you can specify the ALWNULL() keyword on an "H" spec at the top of the program.  See the example below.

H ALWNULL(*YES)

Open in new window

0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 35

Expert Comment

by:Gary Patterson
ID: 33749395
BTW, all of the allowed H specs, along with examples are in the V5R3 ILE RPG Reference - a really handy book to review and have at hand if you plan to code RPG:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/books/sc092508.pdf

- Gary Patterson
0
 

Author Closing Comment

by:bobdylan75
ID: 33751811
Thank you Gary!
0
 
LVL 27

Expert Comment

by:tliotta
ID: 33757063
Be careful with ALWNULL(*YES) in place of ALWNULL(*INPUTONLY). It is not documented as an allowable value in V5R3, nor up through V7R1.

Tom
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question