Logo

  • Search in titles only Search in RPG/RPGLE only Search
  • Advanced Search
  • If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

ibmi-brunch-learn

Announcement

Rpg free dc-pr error in rpg v7 - an assignment operator is expected with the eval.

  • Latest Activity
  • Time All Time Today Last Week Last Month
  • Show All Discussions only Photos only Videos only Links only Polls only Events only

stillin400

  • Join Date: Oct 2013

jj_dahlheimer

  • Join Date: Apr 2014

Scott Klement

  • Join Date: Sep 2012
  • Posts: 2332

RPGPGM.COM - From AS400 to IBM i

Advice about programming, operations, communications, and anything else I can think of This blog is about IBM i for Power

  • About this blog
  • List of all posts
  • IBM i user groups
  • Legal notices
  • Privacy policy
  • Search this site

Wednesday, December 2, 2015

Trying fully free rpg.

fully free rpg

Thanks to the guys at RZKH.DE I was able to try the new fully free RPG this weekend. The latest Technology Refreshes to IBM i 7.2, TR3, and 7.1, TR11, finally brought what can only be described a completely free RPG. Even though " all free " RPG that came in IBM i 7.1 TR7, it was still restricted to be used between the eighth and 80th columns. With these TRs it is no limited by any column restrictions, and I can use any position from the first to the last of the source member.

I thought it would be a good idea for me to share my first impressions of what I have found using " fully free " RPG, covering what I think is good and not so good.

The RZKH.DE informed me that the PTFs necessary for " fully free " was not part of the PTFs they downloaded for the TR3 upgrade to the IBM i 7.2 server.

You will need to have the following PTFs applied on your server to be able to use this:

There is no previous release support for 7.1

You can check the status of these PTFs on your server using the SQL View PTF_LOD. If I wanted to check if the RPG PTFs have been loaded to an IBM i 7.2 server I could use the following SQL statement:

For more information on this View see the post Quick way to find if PTF present and applied .

When coding " fully free " RPG I need to start with the compiler directive **FREE , starting in the first position of the source member. The code of all subsequent lines can start anywhere on the source member's line. See the example below:

The **FREE compiler directive does not have to be upper case, I can use **free too.

What happens when I mix free format RPG with fixed format? For example:

This code does not compile, giving me the message below for line 3, as fixed format code cannot be entered after the **FREE .

But fixed format can be used before the **FREE , see below. But any free format code before the **FREE is restricted to the range of the eighth to the 80th column, see line 1.

With " fully free " RPG I am no longer restricted to use a source file a record length of 112. I can create the largest source file possible, record length of 240, and use that:

In the example below line 5 starts are the 205 position of the source member. I would not recommend making source files with such large record lengths, I just wanted to show what was possible.

I did find documented a way to get around not being able to use fixed format code after the **FREE . It described you would have to use external members containing the fixed format code, what would be copied into a " fully free " member using either /COPY or /INCLUDE . For example:

When compiled the external member is copied into my member. If I look at compile listing I see:

This is another reminder from IBM that it is time to let go of fixed format code, and embrace the free format equivalents.

I think this move to finally free RPG is a big step forward for the language, finally removing it from the restrictions imposed by punch cards all those many years ago. I can see that the inability to insert fixed format code into a " fully free " member will stop some from adopting this, which is a shame and I wish that IBM would have allowed fixed format lines after the **FREE .

Will you start using " fully free " RPG? Let me know your thoughts in the comments below.

You can learn more about the **FREE compiler directive from the IBM website here .

This article was written for IBM i 7.2 TR3 and 7.1 TR11, and later releases.

31 comments:

an assignment operator is expected with the eval operation

As soon as I am able, does rational developer have any issues with the new all free?

an assignment operator is expected with the eval operation

A very good question. I do not have a RDi licensed to use with the RZKH's IBM i server so I cannot say.

an assignment operator is expected with the eval operation

I have 9.6 and it works a hell lot better than the SEU. Still doesn't convert any specification except C specs, and that too with those eye sores "/free" and "/end-free". Worth the pain to remove them, I guess.

RDi actually supported the fully-free syntax with V9.5. It effectively pre-announced the compiler enhancements when the announce cycles got out of sync. P.S. Compiler updates are never _part_ of a TR - they are just commonly announced at the same time. So the required PTFs will never be included in TR sets.

P.P.S. It you have a license to RDi Simon you can connect to any number of servers - so you are free to use yours with RZKH's system.

Our user group (www.tug.ca) had a session on RDi delivered by IBM and it was apparently ready before the IBM I was ready.

What name does RPG go by that has free format H,F, and D specs? All Free RPG?

I wrote my first fully free RPG program after reading a 4 part article titled "The Geezer's Guide" from Jon Paris published last year in ITJungle's Four Hundred Guru. However it is always helpful to hear on the same topic from a different speaker. It raises new points, show new angels, and help understand better. Thank you Simon

You are welcome. I agree it is always useful to have several sources.

Like always a wonderfully written piece. I've not had the pleasure to write fully free RPG as we're upgrading the i piecemeal at the moment, but we're already enjoying the benefits of all free RPG on 7.2 TR1.

Great article, I have been trying to make full free format work but after installing PTF's, Rdi still only shows 80 columns. If i type past the 80 column mark, the editor beeps and issues msg that only 80 columns are allowed. Can anyone assist? Thank you

You need to be using RDi 9.5 Anonymous. You don't say which version you are currently using. You also need to code: **FREE In the first 6 positions of the first line in the source. Once you have done that only free-form code can be used. If any fixed form is required (e.g. O-Specs) then they must be included via /Copy. Hope that helps.

I am having issues compiling SQLRPGLE with **FREE. Are there know issues with **FREE and embedded SQL?

http://www-912.ibm.com/n_dir/nas4apar.nsf/c79815e083182fec862564c00079d117/fa2f5bd27cc132f086257f1c0041ecdb?OpenDocument&Highlight=2%2CSE63525

What if I would like to end the free and start fixed format RPG again? For example, I need to insert a 100 - line code in between an existing code of 1000 lines which is in fixed format. Is there any compiler directive like "**END-FREE" ?

Alas, once you go "fully free", with the **FREE, you cannot go back to using fixed format in the same source unless you include it in a /COPY member. /FREE and /END-FREE we "retired" in IBM i 7. TR7. You no longer need them.

hi guys, excuse my, I have V7R1M0 into my iSeries. I created in myLib a PF-SRC 112 lenght, for full free source what type of source is right? RPGLE?

The source file should be 112 or longer. The default source types should be RPGLE or SQLRPGLE.

hi Simon, thank you, I did it, with F6 get my RPGLE source I try to write this: 01 **free 02 dcl-s Incoming char(30); and press enter I get error: column 6 mast be H or F or C... etc any suggestions? thank

Check this post out as it explains how to turn off syntax checking: Using SEU with totally free RPG

The above link does not work. Try here

hi simon, It gives error on my system for **free. My PTFs are also in place. What else should I check? Message is: Form-Type entry for main procedure not valid or out of sequence.

I think you will find that the post Using SEU with totally free RPG explains how to turn off syntax checking.

This link is no longer working... "Using SEU with totally free RPG"

Blogger changed the way the links in comments works. Try here

IBM hasn't made all RPG syntax elements to equivalent free form. So fix form code will stay until IBM free them completely. But it seems IBM doesn't intend to free all RPG yet.

Which RPG syntax elements do not have free format equivalents?

I'm a Java developer and trying to learn RPGLE. I have a problem, is that fully free format can do anything like fixed format? is there any restrictions using fully free format or not?

Everything you can do in fixed column RPG you can also do in free format RPG. Providing your IBM i has the right release and PTFs there is no reason why you cannot jump right in and be free!

Basically, RPG Full Free Format is the younger, sexier version of the Fixed Format. IBM had to go with the modern times and columnized programming language didn't appeal to many. I recently had my RPG training, we started in Free Format (the one where everything except C lines are in fixed) and eventually ended up using Full Free Format. In my opinion, this brings RPG to the same level of modernization as "younger" languages.

The reason for fixed columns goes back to the days of punch cards!

To prevent "comment spam" all comments are moderated. Learn about this website's comments policy here . Some people have reported that they cannot post a comment using certain computers and browsers. If this is you feel free to use the Contact Form to send me the comment and I will post it for you, please include the title of the post so I know which one to post the comment to.

cppreference.com

Assignment operators.

Assignment operators modify the value of the object.

[ edit ] Definitions

Copy assignment replaces the contents of the object a with a copy of the contents of b ( b is not modified). For class types, this is performed in a special member function, described in copy assignment operator .

For non-class types, copy and move assignment are indistinguishable and are referred to as direct assignment .

Compound assignment replace the contents of the object a with the result of a binary operation between the previous value of a and the value of b .

[ edit ] Assignment operator syntax

The assignment expressions have the form

  • ↑ target-expr must have higher precedence than an assignment expression.
  • ↑ new-value cannot be a comma expression, because its precedence is lower.

[ edit ] Built-in simple assignment operator

For the built-in simple assignment, the object referred to by target-expr is modified by replacing its value with the result of new-value . target-expr must be a modifiable lvalue.

The result of a built-in simple assignment is an lvalue of the type of target-expr , referring to target-expr . If target-expr is a bit-field , the result is also a bit-field.

[ edit ] Assignment from an expression

If new-value is an expression, it is implicitly converted to the cv-unqualified type of target-expr . When target-expr is a bit-field that cannot represent the value of the expression, the resulting value of the bit-field is implementation-defined.

If target-expr and new-value identify overlapping objects, the behavior is undefined (unless the overlap is exact and the type is the same).

In overload resolution against user-defined operators , for every type T , the following function signatures participate in overload resolution:

For every enumeration or pointer to member type T , optionally volatile-qualified, the following function signature participates in overload resolution:

For every pair A1 and A2 , where A1 is an arithmetic type (optionally volatile-qualified) and A2 is a promoted arithmetic type, the following function signature participates in overload resolution:

[ edit ] Built-in compound assignment operator

The behavior of every built-in compound-assignment expression target-expr   op   =   new-value is exactly the same as the behavior of the expression target-expr   =   target-expr   op   new-value , except that target-expr is evaluated only once.

The requirements on target-expr and new-value of built-in simple assignment operators also apply. Furthermore:

  • For + = and - = , the type of target-expr must be an arithmetic type or a pointer to a (possibly cv-qualified) completely-defined object type .
  • For all other compound assignment operators, the type of target-expr must be an arithmetic type.

In overload resolution against user-defined operators , for every pair A1 and A2 , where A1 is an arithmetic type (optionally volatile-qualified) and A2 is a promoted arithmetic type, the following function signatures participate in overload resolution:

For every pair I1 and I2 , where I1 is an integral type (optionally volatile-qualified) and I2 is a promoted integral type, the following function signatures participate in overload resolution:

For every optionally cv-qualified object type T , the following function signatures participate in overload resolution:

[ edit ] Example

Possible output:

[ edit ] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

[ edit ] See also

Operator precedence

Operator overloading

  • Recent changes
  • Offline version
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
  • Page information
  • In other languages
  • This page was last modified on 25 January 2024, at 22:41.
  • This page has been accessed 410,142 times.
  • Privacy policy
  • About cppreference.com
  • Disclaimers

Powered by MediaWiki

  • Introduction
  • User Interface
  • AS400 Commands
  • CL Programming

RPGLE Free Format Tutorial

Compiler Errors – RPGLE Tutorial

In this tutorial we focuses on compiler errors in RPGLE, how to find compiler errors using spooled files and correct them. This...

an assignment operator is expected with the eval operation

In this tutorial we focuses on compiler errors in RPGLE, how to find compiler errors using spooled files and correct them.

This is the second tutorial of the set of RPGLE Free format Tutorial. If you have not completed first tutorial of Hello World RPGLE Tutorial , I strongly suggest you to go through it because this part is linked with it.

Previous Tutorial

Hello world rpgle tutorial.

Lets edit our source again, and change it as follows instead of displaying ‘Hello World’, it tries to display a variable called “ name “. This is an undefined variable and generates a compiler error.

edited source with undefined variable

Delete the old version of the program by using the DLTPGM command

Delete Program - DLTPGM command menu

Make sure to put your library to library list or set it as current library . otherwise you have to specify which library your program is in. Learn more about library list >> Library List

Compile the program again. It fails with a severity 30 compiler error.

Compilation stopped error. Severity 30 errors found in program

If you are using IBM RDi , for edit RPGLE click the RNF7030 error in the Error List Window. It highlights the line that tried to display the “name” variable.

If you are using SEU, use the WRKSPLF command to see the list of spooled files. use F18 (SHIFT + F6) to go to the bottom of the list.

List of Spooled Files in AS400

If you are not familiar with spooled files, go through WRKSPLF – Work with Spooled Files . It explains all about spooled files with examples.

Find Compiler errors in Spooled Files

Use option 5 on the HELLO spooled file and use the B command to go to the end of the listing.

End of Spooled File for HELLO Program

Page up a bit until you find the list of the compiler errors , then take note of the error message id with the highest severity. In this example it’s RNF7030

Spotting Msg id of highest severity error in spooled file

Return to the beginning (command T on control) of the file and enter RNF7030 on the search line, then hit F16 (SHIFT + F4) to locate the compiler errors in the listing.

RNF7030 error with error message and statement id

The compiler error message has a statement number (statement 2) and the error message is “ The name or indicator NAME is not defined “.

Page back in the listing to find statement 2 (on the left side of the listing). It is the line that tried to display the “name” variable.

Source Specification inside the Spooled file

The compiler error message indicates that NAME is not defined. To correct it, you have to add a definition for a variable called NAME . RPG IV is not case-sensitive for variable names, so variable “ name ” is the same as variable “ NAME “. The uppercase form of the name appears in the listing in error messages and the cross-reference.

Correct compiler errors and compile program

Move back to Program Development Manager (PDM) pressing F12 twice or using WRKMBRPDM command.

If you want to learn most useful AS400 commands, you can follow this article which list 23 most useful AS400 commands .

Open program in SEU using option 2 and add the following dcl-s statement to the beginning of your program to define variable “ name “. Remember to code only between columns 8 – 80.

Edit Source adding dcl-s statement to add variable name

Warning :  SEU gives errors for every free-form H, F, D, or P statement Therefore RPG syntax checker used by SEU was last updated in 6.1, so it does not understand the new syntax. If you still want to use SEU, you have to exit with errors after you save your source.

If you got an error like “ An assignment operator is expected with the EVAL operation “ that because SEU does not understand the new syntax of RPGLE free format. you have to exit with errors after you save your source. anyway the compiler will not give any errors and it will run without errors.

Recompile the program and call it again. It puts up a message saying “ DSPLY Corona “.

Output of Program

That is the end of compiler errors – RPGLE tutorial. In next chapter we can focus on debugging RPGLE programs.

Source :  IBM Developer Portal

Share this:

an assignment operator is expected with the eval operation

Written by AS400i

SEU-Editor-Hello-World

Simple RPGLE Program (Hello World)

Why dont you add your experience here cancel reply.

Physical File in AS400

Forgot your password?

Lost your password? Please enter your email address. You will receive mail with link to set new password.

Back to login

IMAGES

  1. Assignment Operators in Java with Examples

    an assignment operator is expected with the eval operation

  2. [100% Working Code]

    an assignment operator is expected with the eval operation

  3. PPT

    an assignment operator is expected with the eval operation

  4. How Matlab Assignment Operator Works (Example)

    an assignment operator is expected with the eval operation

  5. PPT

    an assignment operator is expected with the eval operation

  6. Assignment Operators in C

    an assignment operator is expected with the eval operation

VIDEO

  1. Assignment 1 Operation Management

  2. UP Police Radio Operator Answer Key Out

  3. UP Police Radio Operator Expected Cutoff I UP Police Radio Operator Answer Key

  4. UP POLICE HEAD OPERATOR/ASSISTANT OPERATOR EXPECTED CUT OFF 2024

  5. radio operator expected cut off 2024

  6. up radio operator expected cut off #upconstablepreviousyearpaper #dreampolice #upsc #updates #gk

COMMENTS

  1. Rnf5347

    RNF5347. An assignment operator is expected with the EVAL operation. 30. Cause . . . . . : An assignment symbol "=" is expected after the left-hand side of an assignment operation and was not found. The specification is ignored. Recovery . . . : Insert the required assignment operator for the EVAL operation. Compile again.

  2. the STUPID "An assignment operator is expected with the EVAL operation

    Today's Posts; Member List; Calendar; IBMi AS400 Solutions; Forum; Iseries Programming Languages; RPG/RPGLE; If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

  3. KD_raj185 rpgle code in as400 try this please

    an assignment operator is expected with the eval operation; a semi colon is not specified at the end of a free format statement; the name or indicator is not defined; the compiler cannot determine how the program can end try this please; hope its clear for issue

  4. RE: SQL: RNF5347E An assignment operator is expected with the EVAL

    RE: SQL: RNF5347E An assignment operator is expected with the EVAL operation. -- I figured the source member type was too easy a solution, but that was the only I was duplicating the issue. Glad you got it resolved. I've never been a fan of having to have the SET Options be the first SQL code to appear in the program in a top-down fash...

  5. AW: SQL: RNF5347E An assignment operator is expected with the EVAL

    Date. AW: SQL: RNF5347E An assignment operator is expected with the EVAL operation. -- code to appear in the program in a top-down fashion. SET OPTION is never executed but is the equivalent of the H-Specs for embedded SQL.

  6. Se58811: Rdi 9.0 Verify of Sqlrpgle Source May Incorrectly Issue ...

    RNF5347 An assignment operator is expected with the EVAL operation. RNF7030 The name or indicator END is not defined. ... RNF5347 An assignment operator is expected with the EVAL operation. RNF7030 The name or indicator END is not defined. Problem conclusion. This problem is fixed in RDi 9.1. Temporary fix. Comments. APAR Information.

  7. Python's Assignment Operator: Write Robust Assignments

    To create a new variable or to update the value of an existing one in Python, you'll use an assignment statement. This statement has the following three components: A left operand, which must be a variable. The assignment operator ( =) A right operand, which can be a concrete value, an object, or an expression.

  8. SQL: RNF5347E An assignment operator is expected with the EVAL operation

    Date. SQL: RNF5347E An assignment operator is expected with the EVAL operation. -- exec sql update rob/a1sqlf set mykey=mykey*1 where current of C1; Gets RNF5347E An assignment operator is expected with the EVAL operation. No tgtrls specified. Using CRTSQLRPGI. Complete program follows: H ActGrp (*CALLER) H DftActGrp (*NO) D OpenCursor PR...

  9. TechTip: Getting Free-form RPG on your IBM i

    RNF5347E An assignment operator is expected with the EVAL operation. As you can see, the editor doesn't quite know what to make of the ctl-opt statement. And while getting the syntax errors is a pain, the real pain is that the syntax isn't integrated into either the tool or the help text, so you'll need to go to IBM's old-school PDF syntax ...

  10. IBM

    IBM - United States

  11. RPG FREE DC-PR error in RPG V7

    An assignment operator is expected with the EVAL operation. We are in V7. Does anybody have same issue?. Any help is greatly appreciated. Thank You Stillin400 Tags: None. jj_dahlheimer. Experienced Forum Member. Join ... An Assignment operator is expected with the EVA

  12. Trying fully free RPG @ RPGPGM.COM

    RNF5347 30 An assignment operator is expected with the EVAL operation. But fixed format can be used before the **FREE , see below. But any free format code before the **FREE is restricted to the range of the eighth to the 80th column, see line 1.

  13. AW: RNF5347E An assignment operator is expected with the EVAL operation

    AW: RNF5347E An assignment operator is expected with the EVAL operation. -- The SET OPTION - statement must be physically the FIRST SQL Statement in your source code. Insert your SET OPTION statement as 1st C-Statement. In NoMain procedures it can be inserted before the 1st P-Statement. Mit freundlichen Grüßen / Best regards Birgi...

  14. Assignment operators

    for assignments to class type objects, the right operand could be an initializer list only when the assignment is defined by a user-defined assignment operator. removed user-defined assignment constraint. CWG 1538. C++11. E1 ={E2} was equivalent to E1 = T(E2) ( T is the type of E1 ), this introduced a C-style cast. it is equivalent to E1 = T{E2}

  15. Compiler Errors

    Move back to Program Development Manager (PDM) pressing F12 twice or using WRKMBRPDM command.. If you want to learn most useful AS400 commands, you can follow this article which list 23 most useful AS400 commands.. Open program in SEU using option 2 and add the following dcl-s statement to the beginning of your program to define variable "name". ...

  16. Re: SQL: RNF5347E An assignment operator is expected with the EVAL

    To: RPG programming on the IBM i/System i <rpg400-l@xxxxxxxxxxxx>. Date: 02/10/2010 12:05 PM. Subject: SQL: RNF5347E An assignment operator is expected with the. EVAL operation. Sent by: rpg400-l-bounces@xxxxxxxxxxxx. exec sql update rob/a1sqlf set mykey=mykey*1. where current of C1;

  17. What does "Assignment Operator Expected" ERROR mean?

    Same happens if you try to run a script or command but forget the parentheses

  18. RE: RNF5347E An assignment operator is expected with the EVAL operation

    Subject: SQL: RNF5347E An assignment operator is expected with the EVAL operation. exec sql update rob/a1sqlf set mykey=mykey*1. where current of C1; Gets. RNF5347E An assignment operator is expected with the EVAL operation. No tgtrls specified. Using CRTSQLRPGI.

  19. RE: SQL: RNF5347E An assignment operator is expected with the EVAL

    Subject: RE: SQL: RNF5347E An assignment operator is expected with the EVAL operation. From: Kurt Anderson <kurt.anderson@xxxxxxxxxxxxxx>. Date: Wed, 10 Feb 2010 14:49:06 -0600. Like Michael said, the source requirement changed. That's probably why I have an issue with it. However, if it could be thrown into the H-Specs that'd be wonderful.