Solved

How to write in pogram instruction for the compiler?

Posted on 2010-09-22
6
1,164 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Hello I read in a discussion about a person who configured a very simple mirror RAID with two hard drives; the system and data were on the same partition. He asked how to repair the system as it was not booting up anymore. In his case running …
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
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.

770 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