× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I didn't know if COBOL would ever enter my life again, but it has and I am
doing some wheel spinning. I am working with a shop that is on the iSeries
and has zero RPG coders so I am trying to span the gap and understand some
basic ILE syntax priciples in the COBOL environment.

Below I have contructed a very busy sub procedure that takes on a variety of
parameter passing features. I have been reading the Infocenter COBOL
manuals but the going is slow and I am wondering if somebody could give me a
kick start and convert it into COBOL??

Basically I need to know:
1) How to build proc1 into a COBOL prototype that could be /COPY'd into a
COBOL program
2) How to build a data structure and then reference it using something
similar to our LIKEDS (I saw COBOL has the LIKE keyword and I have been
playing around with that).
3) Show an example of calling this sub procedure from a mainline.
4) Show an example of defining/coding a local sub procedure.

D proc1 pr 3 0
D pParm1 10a const
D pParm2 15P 0 value options(*omit)
D pParm3 z value
D pParm4 128a value varying
D pParm5 n value
D pParm6 like(fld1)
D pParm7 likeds(ds1) options(*nopass)
D pParm8 * procptr value options(*nopass)

D fld1 s 10a

D ds1 ds qualified inz
D fld1 1024a varying
D fld2 10a
D fld3 10i 0
D fld4 30a varying

Makes me with they had a "COBOL for RPG programmers" book :-)

Thanks in advance,
Aaron Bartell
http://mowyourlawn.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.