× 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.



 >>  Someone suggested I pass one parameter - so I'll try this.

You can pass as many parameters as you want, but each one must correspond to
an 01 or 77 level in the LINKAGE SECTION of the COBOL program.  In this
respect COBOL is no different to RPG.  i.e. you can pass a DS or a single
field but not one in the middle of a data structure.

Your problem is not with COBOL so much as it is with the fact that CL has no
means to describe data structures.  You can either pass multiple parms, or
you can go through a nasty, messy, error prone concatenation operation to
form a single parm.

Do you _really_ need to use CL at all?  Using a COBOL or RPG program to call
this routine would make a lot more sense.



Jon Paris
Partner400





Thanks

Dennis Nel
Technical Consultant: AS/400

-----Original Message-----
From: geir.kildal@entragroup.com [mailto:geir.kildal@entragroup.com[1]]
Sent: 09 October 2001 01:37
To: cobol400-l@midrange.com
Subject: RE: Parameter List from CL to Cobol

This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
If you have the same number of parameters defined within LINKAGE SECTION
(ALL WITH 01-LEVEL!) and PROCEDURE DIVISION USING parm1 parm2...parmn(all
01-level parameters from lLINKAGE), It should work.

The message you get says that the number of parameters you are passing,
are a different number from the number of prameters  the COBOL-program
expects.

Mvh.

Geir

Nel Dennis <DNel3@OLDMUTUAL.com>
Sent by: cobol400-l-admin@midrange.com
09.10.01 13:25
Please respond to cobol400-l

        To:     "'cobol400-l@midrange.com'" <cobol400-l@midrange.com>
        cc:
        Subject:        RE: Parameter List from CL to Cobol

[ Converted text/html to text/plain ]

In COBOL
                And in CL
ACBL1001-USERID         PIC  X(08) VAR(&USERID)
TYPE(*CHAR) LEN(8)
ACBL1001-STATION                PIC  X(08)
VAR(&STATION) TYPE(*CHAR) LEN(8)
ACBL1001-REQUEST-TYPE   PIC  X(01) VAR(&LOG)
TYPE(*CHAR) LEN(1)
ACBL1001-CONTINUE               PIC  X(01)
VAR(&CONT_NO) TYPE(*CHAR) LEN(1)
ACBL1001-PROGRAMID              PIC  X(10)
VAR(&PGMID)   TYPE(*CHAR) LEN(10)
ACBL1001-PROGRAMVR              PIC  X(05)
VAR(&PGMVER)  TYPE(*CHAR) LEN(5)
ACBL1001-COUNTRYCD              PIC  9(03) COMP-3.
VAR(&CNTRYD) TYPE(*DEC) LEN(3 0)
ACBL1001-ERROR-RETURN   PIC  X(07) VAR(&ERR_RTRN)
TYPE(*CHAR) LEN(7)
ACBL1001-RETURNCD               PIC  X(07)
VAR(&RETURNCD) TYPE(*CHAR) LEN(7)
ACBL1001-PROGRAMSEQ             PIC  9(03)
VAR(&PGMSEQ) TYPE(*DEC) LEN(3 0)
ACBL1001-RETURNMSG              PIC  X(78)
VAR(&RETURNMSG) TYPE(*CHAR) LEN(78)

Yet when I run the CL program with the following call;
        CALL       PGM(ACBL1001) PARM(&USERID &STATION &LOG &CONT_NO
&PGMID &PGMVER
+
                                   &CNTRYD &ERR_RTRN &RETURNCD &PGMSEQ
&RETURNMSG)

I get Parameters passed on CALL do not match those required.

Thanks
Dennis Nel
Technical Consultant: AS/400

*       DNel3@oldmutual.com
(       (021) 509-3459
È       (082) 808-2687
_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l[2]
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l[3].

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l[4]
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l[5].

ݾferences:Ý  1. mailto:geir.kildal@entragroup.com
  2. http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
  3. http://archive.midrange.com/cobol400-l
  4. http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
  5. http://archive.midrange.com/cobol400-l

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.