Solved

How to write in pogram instruction for the compiler?

Posted on 2010-09-22
6
1,160 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
  • 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 34

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 34

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now