Both compiled with no errors. Program called w/out errors.
Debugged and it does what I want except that there is no output in the displayed fields.
I do not use EXFMT command as I use subroutines to check inut validity and want to output with error indicator on (i.e. 30, 31...) and position the cursor on the error field.
I do a READ operation in the "main part" of the program.
What's wrong?

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: 16 &nbspReplies

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

You haven't listed any fields under the exception 'O'-spec. With no fields listed, there are no fields assigned to receive values. That is, all of the fields are "not output". If you have 'O'-specs for an externally-described file, only fields named in the 'O'-spec group are output.

I've never seen anyone use EXCEPT for a display file. It doesn't seem to make much sense. A WRITE op-code would seem to be a better choice, and no 'O'-spec should be in the source.

I know my question can be silly, but after a 15 years stop from S36 programming, I try to become acquainted with ILE etc. So I thought that having external defined files it would just populate the fields with their value at EXCEPT time without having to declare them in the 'O'-spec.I thought that WRITE was only for DISK or PRINTER files because, as said in IBM's ILE Reference Guide, it writes a new record to a file.I'll try also to understand why, although red colour and position cursor are ON (debug tested), the field remains in the original turquoise.

The 'O'-spec in the questionshows FMGESTION as an EXCEPT line named FGEST1. And the '(NOTOUT)' is the EXCEPT output of the compiler for an EXCEPT record field that is "not output". Unfortunately, the behavior is only indirectly documented (AFAIK).

@argasoft:

Usually, externally-described files don't need fields coded for input or output. But because you actually coded an 'O'-spec (which normally wouldn't be coded at all), you're telling the compiler that you will do the output yourself.

The documentation for the usage of EXCEPT says that an 'O'-spec with no fields can be used for an "unlock" operation. That's the only mention that I know of for no coded fields.

if OK either EXSR DSPFMT02 (if values for this have to be set-up) or EXCEPT FMT02

ENDSR

I find it somehow more readable. I have always used a lot of indicators as I had put up a sort of standard (01-09 for displays, 10 validity check OK, 50 for CHAIN, 90 for READ, from 30 for HI and PC in case of errors).

But the real problems are that after checking and with errors present DSPF is shown but:- error fields not red coloured (see DDS)- incorrect PC

Of course I use the right indicators in ILE and they are on (checked with a "home-made" debug, i.e. printing *INs and field values at different points of the program.

I hope it's understandable and clear.

TIA a lot.

Arnaldo

P.S. In case I can give a link to download pdfs of ILE-source and PF and DSPF DDSs

Gonna change this morning (I'm on the other side of the ocean) and let you know.By the way I've downloaded some IBM manuals and others for CL (which replaces the god ol' OCL on S36) but do you know if there is some book that shows equivalents (WITH examples) between OCL and CL?

I mean something like:// LOAD PGM// FILE NAME-XXX, LABEL-YYY, etcetc

becomescall pgm???

I already know that with external defined files CALL PGM command is enough.

Up until 15 years ago, there was a Redbook titled 'Converting System/36 environment applications to Native' (GG24-3304-01). It seems to have been discontinued some time before then. I have one or two very old REDbook CDs stashed somewhere around here. If I run across one, I'll see if I can extract that Redbook from it.

But one problem with it is that it described converting to an AS/400 environment that was more than 20 years ago. Things have changed a lot since that manual was first written back in 1990 (I think). Even RPG III is effectively gone in current releases. (It can still be purchased, but it's now an extra cost option as is RPG II.)

There is still a cross-reference list of OCL-to-CL commands available. It's an old .PDF you can download. See the V4R5 System Programming Support page and look down for 'System/36-AS/400 Command Cross-Reference: SX41-3732'. There is also a HTML link, and that works much better for me. It's not a particularly useful manual in the first place.

Mostly there are just a few concepts that need to be grasped. Maybe your best direction is simply to ask a few questions. Find a couple OCL procs that don't seem to have a good match to CL, post them and ask how they should be done. Discussion can cover the underlying designs that could help explain the useful concepts.

Anyway, if I find the Redbook CD, I'll see if anything can be done with it.

Approaching actual RPGILE/CL after many years of developing on S36 (RPGII and OCL up to SSP 7.0) and a stop of about 15 years.I cannot use S36 environment as my 400 host provider: they told me it's not active due to security reasons.Anyway to learn something new.

Yes, you compile CL programs and CALL them just like you call any program. You can also compile CL modules and bind them with RPG to make a single program that consists of both languages. A CL module could be called something like the way that a subroutine is executed.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

Share this item with your network:

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy