Solved

RPG Program

Posted on 2008-07-28
15
1,507 Views
Last Modified: 2013-11-25
I am practicing writing RPG IV programs and I came across an interesting program that I have been trying to get it to work but with no luck. Any ideas will be greatly appreciated. Thanks.

Dude

RPG-IV-program.txt
0
Comment
Question by:dude02
[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
  • 7
  • 7
15 Comments
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 22110805
Hi Dude,

What do you think this program will do for you ?

Regards,
Murph
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 22112112
A program header will help to start, just informational.

comment lines dont start with // for normal RPG (only for free-format)
Otherwise you have to type a * on pos 7.
This // in non free-format will generate errors

Regards,
Murph
0
 
LVL 4

Author Comment

by:dude02
ID: 22137648
Can I write the free-format within a RPGL program?
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 22138548
Hi Dude,

Yes you can but only the C-specs (Calculation part)
Start the first line of the freeformat with /FREE on position 7 (remark, the C is pos. 6)
end the program with /END-FREE   (as already in your example)
every line has to be to end with a semicolon ";"

and (don't forget) the source type must be RPGLE.

Good Luck,
Murph
0
 
LVL 4

Author Comment

by:dude02
ID: 22152242
Thanks for all your help. I am getting this error message:
What do I need to do in order to correct the problem. I did double check all entries and they are all correct.
 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1....+....2....+....3
  5722WDS V5R4M0  060210 RN        IBM ILE RPG             TESTPLG/DATECALCR        S1041135   08/04/08 09:26:10        Page      2
 Line   <---------------------- Source Specifications ----------------------------><---- Comments ----> Do  Page  Change Src Seq    
 Number ....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...10 Num Line  Date   Id  Number
                           S o u r c e   L i s t i n g                                                                              
      1 FDATECALCD CF   E             WORKSTN INDDS(Indicators)                                                   080801     000100
      2  *//-----------------------------------Procedure interfaces                                               080729     000200
         *--------------------------------------------------------------------------------------------*                            
         *                               RPG name         External name                               *                            
         * File name. . . . . . . . . :  DATECALCD        TESTPLG/DATECALCD                           *                            
         * Record format(s) . . . . . :  DATECALC01       DATECALC01                                  *                            
         *                               DATECALC02       DATECALC02                                  *                            
         *--------------------------------------------------------------------------------------------*                            
      3 D DayName         PR             9                                                                        080728     000300
 ======> aaaaaaaaaaaaaaa                                                                                                            
 *RNF3788 30 a      000300  Keyword EXTPGM must be specified when DFTACTGRP(*YES) is                                                
                            specified on the CRTBNDRPG command.                                                                    
      4 D                                 D   VALUE                                                               080728     000400
      5  *//---------------------------------------Indicator data structure                                       080729     000500
      6 D Indicators      DS                                                                                      080728     000600
                                                                                                                                                                                             
0
 
LVL 4

Author Comment

by:dude02
ID: 22153180
Ok I found I had to prompt f4 when compling and change the setting: Default activation group . . . .   *YES       to *NO.
                                                             
0
 
LVL 4

Author Comment

by:dude02
ID: 22153923
The program seems to work but when I press F9 I get an error message that states invalid key. It should send me back to the main screen. Any ideas?
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 22154756
Hi Dude,

Did you anabled the CF09 key in your DDS source?

Regards,
Murph
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 22154805
oop typo  anable = enable :)

A little tip for compiling errors (maybe you are aware of it, but any way):
Open the source for EDIT then press F15  and choos 2 (spoolfiles) and enter.
if you get an error press F4 to select your compiler listing and press enter.

Now you see in the top half of your screen the source, the lower part, the listing
go to the command line of your listing and search there for *ERR
(Type *ERR end press F16)
Now you find the first error and the error in the message line in your screen.
Put your cursor on this message line and press F1 an extended help about this error is shown.

Regards,
Murph
0
 
LVL 4

Author Comment

by:dude02
ID: 22155563
Take a look at the code to see if I am missing something that would cause the F9 key not to function correctly. Thanks.
DateCalCR.txt
0
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 500 total points
ID: 22156236
I can't see it in this source, the F9 key must be specified in your DDS file DATECALCD
in the top part of your DDS source you have to include the next line:

A                                      CF09

A line like that should be there allready if your F10 is working


0
 
LVL 4

Author Comment

by:dude02
ID: 22161163

 I was missing CA09(09). Thanks for all your help.
 
0
 
LVL 4

Author Closing Comment

by:dude02
ID: 31480878
Thanks for all your help.
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 22162355
Hi Dude,

Consider the Use of CA or CF keys.

CA09 is sending the F9 key to the program
CF09 is sending F9  but also the screen buffer to your program.

Regards,
Murph
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

695 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