AS400 Mid Range/cmd prompt error msgs on compile

Advertisement


Question
QUESTION: http://www.fuel-efficient-vehicles.org/pwsdb/pgm/tutorial-view.php?topic=15

on this web site it shows cmd prompt on cl, i keep getting errors of wrong setting when i compile it, is that outdated code?

ANSWER: What error message is the system giving you and on which line or lines of the CL program?

- Laird

---------- FOLLOW-UP ----------

QUESTION: on the CMD PROMPT LINES and the PARM lines, compile error msg says wrong setting, i am taking it, thats means wrong invironemen.

i tried doing it on a clpgm

ANSWER: Yes - sorry I misunderstood - everything from the CMD  PROMPT statement to the PARM KWD(SIZLMT) line are source code for a command, and belong in a source member in QCMDSRC file, to be created as a command using the CRTCMD command.

- Laird

---------- FOLLOW-UP ----------

QUESTION: crtcmd works fine, thanks

one last question, i created a physical with dds , rpg programs say it does dds not found. my question is i copied another physical file and deleted all the old lines, it compiled but said actual dds was XXXXXX. i thought you could copy a physical member, rename it and created a new PF with no problem, was i wrong?

Answer
If you create a file TEST from DDS with record format TESTR, then copy the file to TEST2, the new file should be still defined by DDS. The record format of TEST2 will also be TESTR, because that's what the DDS specifies.

When creating the PF, be sure to specify the name of the DDS source file, library and member, and NOT to specify a record length (for files described by DDS, the system will calculate a record length from the DDS). Otherwise, you may end up creating a flat file (non-DDS) with the record length that you specify.

- Laird

AS400 Mid Range

All Answers


Answers by Expert:


Ask Experts

Volunteer


Concise Systems/Laird Scranton

Expertise

General AS/400, RPG/400, SDA and CL programming questions. AS/400 performance tuning.

Experience


Past/Present clients
CB Sportswear
Coca-Cola of New York
Encore Paper Company
Golub Corporation
HBO Home Video
Imperial Pools
Kaiser Permanente of NE New York
Mallinckrodt Medical
Marigold Foods
Manpower & Associates
National Datacomputers
New York State Easter Seals Society
New York State Food Merchants Association
Pepsi-Cola Allied Bottlers
Petricca Construction
Taconic Telephone Corporation
TOMRA Recycling
Unistress Corporation

©2012 About.com, a part of The New York Times Company. All rights reserved.