Solved

How to write in pogram instruction for the compiler?

Posted on 2010-09-22
6
1,165 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 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Storing REST data JSON to an iSeries (as400) IFS file 12 152
Monitor SQL Insert 8 74
inplace upgrade from Windows 2003 R2 to 2012 8 90
IBM TS3100 tape Library 3 37
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 …
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
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.

808 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