From PARM= to PROC DIV USING? 
Author Message
 From PARM= to PROC DIV USING?

I know that the PARM= data is available to the executed program via the
USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
defination.

I just can't seem to find it in the manuals for COBOL for MVS and VM on
IBM's Bookmanager site.

Where is it documented?

TIA,
Bill

--
wthompson at spam.not.okc.disa.mil

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Sun, 10 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?


Quote:
> I know that the PARM= data is available to the executed program via
the
> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
> defination.

> I just can't seem to find it in the manuals for COBOL for MVS and VM
on
> IBM's Bookmanager site.

> Where is it documented?

> TIA,
> Bill

> --
> wthompson at spam.not.okc.disa.mil

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Bill,

Go To:

http://www.s390.ibm.com/bookmgr-cgi/bookmgr.cmd/Shelves/IEA1BK15

and issue a search on JCL.

HTH....

Cheers,

WOB

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Sun, 10 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?
I *never* can find this in the manual when I look for it.  It is there (and
I usually find it 2 or 3 days later) but it can't be found by any "logical"
search.  HOWEVER, the answer is:

1) In your linkage section code:

   01  Passed-Data.
          05  Parm-Len   Pic S9(04) Comp.
          05  Real-Data.
              10  Each-Byte Occurs 1 to 100 times depending on Parm-Len
                                   Pic X.

   ****
or better yet (as you are using an LE-enabled COBOL) look for CEE3PRM which
does it for you. See
  http://www.s390.ibm.com/bookmgr-cgi/bookmgr.cmd/BOOKS/CEEA306/3%2e5%2e12

--
Bill Klein
    wmklein <at> ix dot netcom dot com

Quote:
> I know that the PARM= data is available to the executed program via the
> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
> defination.

> I just can't seem to find it in the manuals for COBOL for MVS and VM on
> IBM's Bookmanager site.

> Where is it documented?

> TIA,
> Bill

> --
> wthompson at spam.not.okc.disa.mil

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Sun, 10 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?

Quote:

> I know that the PARM= data is available to the executed program via the
> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
> defination.

> I just can't seem to find it in the manuals for COBOL for MVS and VM on
> IBM's Bookmanager site.

> Where is it documented?

Incrediburgable!! (I guess that dates me!)

I kept looking long after I should have gone home, and finally found
something of documentation in the "OS/390 V2R6.0 MVS Assembler Services
Guide", in section 2.7.1 which describes how data is passed to Assembler
programs. I guess you are supposed to extrapolate from that to COBOL, or
have one of your systems programmers tell you how, or find a working
example in an old COBOL program.

The link to that page (I think) is:

http://www.s390.ibm.com:80/bookmgr-cgi/bookmgr.cmd/BOOKS/IEA1A606/2%2...

They don't make these things easy to find...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
They're just my opinions...
Clifton Ivy, Mgmt Info, Purdue University



Sun, 10 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?

LINKAGE SECTION.
01 PARMS.
    05  PARM-LENGTH      PIC S9(04) USAGE COMP.
    05  PARM-TEXT           PIC X(whatever).

PROCEDURE DIVISION USING PARMS.

   DISPLAY 'parm is' PARM-TEXT(1:Parm-Length)

JCL:
    EXEC PGM=FOO,PARM='HELLO WORLD'

--
Michael Mattias
Tal Systems
Racine WI USA
The views and opinions expressed herein are my own.
As I am self-employed, they also express the views of my employer.

Quote:

>I know that the PARM= data is available to the executed program via the
>USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
>defination.

>I just can't seem to find it in the manuals for COBOL for MVS and VM on
>IBM's Bookmanager site.

>Where is it documented?

>TIA,
>Bill

>--
>wthompson at spam.not.okc.disa.mil

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.



Sun, 10 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?


Quote:
> I know that the PARM= data is available to the executed program via
the
> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
> defination.

This is the code that I use to process parameters, where PARM1 is just a
switch that is present or not and PARM2 has a related value - i.e.
PARM2=value.

WORKING-STORAGE SECTION.
01  WS-PARMS.
    05 WS-PARMS-DATA  OCCURS 10 VALUE SPACE         PIC X(20).

LINKAGE SECTION.
01  LINK-PARMS.
    05 LINK-PARM-LENGTH                       COMP  PIC 9999.
    05 LINK-PARM-DATA                               PIC X(200).

PROCEDURE DIVISION USING LINK-PARMS.
UNSTRING LINK-PARM-DATA(1:LINK-PARM-LENGTH)
  DELIMITED BY ',' OR '='
  INTO WS-PARMS-DATA(1)
       WS-PARMS-DATA(2)
       WS-PARMS-DATA(3)
       WS-PARMS-DATA(4)
       WS-PARMS-DATA(5)
       WS-PARMS-DATA(6)
       WS-PARMS-DATA(7)
       WS-PARMS-DATA(8)
       WS-PARMS-DATA(9)
       WS-PARMS-DATA(10)
PERFORM
  VARYING SUB1 FROM 1 BY 1
  UNTIL SUB1 > 9
  EVALUATE WS-PARMS-DATA(SUB1)
  WHEN 'PARM1'
    SET PARM1-SET               TO TRUE
  WHEN 'PARM2'
    MOVE WS-PARMS-DATA(SUB1 + 1)
                                TO PARM2-VALUE
    ADD  1                      TO SUB1
  WHEN OTHER
    DISPLAY 'UNKNOWN PARAMETER '
            WS-PARMS-DATA(SUB1)
    STOP RUN
  END-EVALUATE
END-PERFORM
--
Ed Milne

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 11 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?

Quote:

> I know that the PARM= data is available to the executed program via the
> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
> defination.

> I just can't seem to find it in the manuals for COBOL for MVS and VM on
> IBM's Bookmanager site.

> Where is it documented?

'Don't know, but this is how it's done:

LINKAGE SECTION.
1       PARMS.
        5       PARM-LENGTH     PIC S9999 BINARY SYNC.
        5       PARM-DATA       PIC X(?).

PROCEDURE DIVISION  USING  PARMS.

That's it. Good technique involves checking the length to see if the
PARM=... was actually coded.

Bill {*filter*}

Note: IBM Mainframe only - can't speak for other flavours.



Mon, 11 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?
(snip)

Quote:
> Incrediburgable!! (I guess that dates me!)

> I kept looking long after I should have gone home, and finally found
> something of documentation in the "OS/390 V2R6.0 MVS Assembler Services
> Guide", in section 2.7.1 which describes how data is passed to Assembler
> programs. I guess you are supposed to extrapolate from that to COBOL, or
> have one of your systems programmers tell you how, or find a working
> example in an old COBOL program.

Is this a multiple choice quiz?

Any experienced COBOLer will tell you the last option is the correct
one.

Bill {*filter*} <G>



Mon, 11 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?


Quote:
> I know that the PARM= data is available to the executed program via
the
> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
> defination.

> I just can't seem to find it in the manuals for COBOL for MVS and VM
on
> IBM's Bookmanager site.

> Where is it documented?

> TIA,
> Bill

> --
> wthompson at spam.not.okc.disa.mil

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Bill,

One other thing. According to IBM Documentation, the maximum length of
the PARM is 100.

BTW, did you ever receive the "EYE-SPY" source-code I sent you ?

Cheers,

WOB

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 11 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?


Quote:
> I *never* can find this in the manual when I look for it.  It is
there (and
> I usually find it 2 or 3 days later) but it can't be found by any
"logical"
> search.  HOWEVER, the answer is:

<snip>

I was trying to figure this out a few months ago.  I am convinced that
IBM COBOL II and IBM COBOL for MVS handle this differently, and here is
my evidence:

1.  My program worked when compiled with teh COBOL II compiler and it
didn't with the COBOL for MVS compiler.
2.  Section 7.2, "Run-Time Options", in the "VS COBOL II Application
Programming Guide" (which can be found at
http://www.s390.ibm.com/bookmgr-cgi/bookmgr.cmd/BOOKS/IGYA1101/7%
2e2?SHELF=IGYSH007) describes exactly what you say.
3.  As the original poster said, the COBOL for MVS/VM manual has no
reference to this process.

Call me crazy, but I can't get it to work.

-Art

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 11 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?

enlightened us:

Quote:


>> I know that the PARM= data is available to the executed program via
>the
>> USING on the PROCEDURE DIVISION statement and a LINKAGE SECTION
>> defination.

>This is the code that I use to process parameters, where PARM1 is just a
>switch that is present or not and PARM2 has a related value - i.e.
>PARM2=value.

>WORKING-STORAGE SECTION.
>01  WS-PARMS.
>    05 WS-PARMS-DATA  OCCURS 10 VALUE SPACE         PIC X(20).

>LINKAGE SECTION.
>01  LINK-PARMS.
>    05 LINK-PARM-LENGTH                       COMP  PIC 9999.
>    05 LINK-PARM-DATA                               PIC X(200).

>PROCEDURE DIVISION USING LINK-PARMS.
>UNSTRING LINK-PARM-DATA(1:LINK-PARM-LENGTH)
>  DELIMITED BY ',' OR '='
>  INTO WS-PARMS-DATA(1)
>       WS-PARMS-DATA(2)
>       WS-PARMS-DATA(3)
>       WS-PARMS-DATA(4)
>       WS-PARMS-DATA(5)
>       WS-PARMS-DATA(6)
>       WS-PARMS-DATA(7)
>       WS-PARMS-DATA(8)
>       WS-PARMS-DATA(9)
>       WS-PARMS-DATA(10)
>PERFORM
>  VARYING SUB1 FROM 1 BY 1
>  UNTIL SUB1 > 9
>  EVALUATE WS-PARMS-DATA(SUB1)
>  WHEN 'PARM1'
>    SET PARM1-SET               TO TRUE
>  WHEN 'PARM2'
>    MOVE WS-PARMS-DATA(SUB1 + 1)
>                                TO PARM2-VALUE
>    ADD  1                      TO SUB1
>  WHEN OTHER
>    DISPLAY 'UNKNOWN PARAMETER '
>            WS-PARMS-DATA(SUB1)
>    STOP RUN
>  END-EVALUATE
>END-PERFORM

All that and in the old days you could define UPSI switches in the
Configuration Section....

Regards,

          ////
         (o o)
-oOO--(_)--OOo-

Laughing stock: cattle with a sense of humor.

Remove nospam to email me.

 Steve



Mon, 11 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?

Quote:

> my evidence:

> 1.  My program worked when compiled with teh COBOL II compiler and it
> didn't with the COBOL for MVS compiler.

Did you compile with SSRANGE in the new release?

Did you get a S0C4 that was hidden by a bad implementation in Cobol
II?

Are you trying to use more than 100 bytes?

The code supplied was exactly right.  Please post enough of your code
for us to help to work it out.

Ken



Tue, 12 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?
I just wanted to note that I tried this today using COBOL II on VSE/ESA and
it worked perfectly.  I've been trying for ages to figure out how to do
this, too!  I had it almost right, but I had the length as PIC S9(8) COMP
instead of S9(4) COMP, and I had the length and the parm as two separate 01
levels instead of both under one 01.  Ah well, so close...
--
---
Frank Swarbrick



Quote:

> > my evidence:

> > 1.  My program worked when compiled with teh COBOL II compiler and it
> > didn't with the COBOL for MVS compiler.

> Did you compile with SSRANGE in the new release?

> Did you get a S0C4 that was hidden by a bad implementation in Cobol
> II?

> Are you trying to use more than 100 bytes?

> The code supplied was exactly right.  Please post enough of your code
> for us to help to work it out.

> Ken



Tue, 12 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?

Quote:

> I *never* can find this in the manual when I look for it.  It is there (and
> I usually find it 2 or 3 days later) but it can't be found by any "logical"
> search.  HOWEVER, the answer is:

> 1) In your linkage section code:

>    01  Passed-Data.
>           05  Parm-Len   Pic S9(04) Comp.
>           05  Real-Data.
>               10  Each-Byte Occurs 1 to 100 times depending on Parm-Len
>                                    Pic X.

I never thought to do an occurs depending on here.  I always expect to
know exactly what was passed (the parm length can show how many parms
were passed from JCL).  But anyway, I always have a program example to
cut and paste so I never had to look it up.

Quote:
>    ****
> or better yet (as you are using an LE-enabled COBOL) look for CEE3PRM which
> does it for you. See
>   http://www.s390.ibm.com/bookmgr-cgi/bookmgr.cmd/BOOKS/CEEA306/3%2e5%2e12

Just looked this up.  I am trying to figure why a Cobol program would
use this.


Fri, 15 Mar 2002 03:00:00 GMT  
 From PARM= to PROC DIV USING?


Quote:
> Did you compile with SSRANGE in the new release?

No.  I compiled it with the default (NOSSRANGE)
Quote:
> Did you get a S0C4 that was hidden by a bad implementation in Cobol
> II?

No.  The program ended with a zero return code.
Quote:
> Are you trying to use more than 100 bytes?
No.
> The code supplied was exactly right.  Please post enough of your code
> for us to help to work it out.

Here is the code.  The output (SYSOUT) is garbage, so I won't post it
here, unless you think it will help.

000100 IDENTIFICATION DIVISION.
000200   PROGRAM-ID. PARMTEST.
000300   AUTHOR. ART PERRY.
000400 DATA DIVISION.
000500* WORKING-STORAGE SECTION.
000600  LINKAGE SECTION.
000700   01  LINK-PARM.
000800       05 LINK-PARM-LENGTH             PIC 9(04) BINARY.
000900       05 LINK-PARM-DATA               PIC X(100).
001000
001100 PROCEDURE DIVISION.
001200     DISPLAY LINK-PARM-DATA (1:LINK-PARM-LENGTH).
001300     GOBACK
001400     .

Here is the compiler warning I get:

LineID  Message code  Message Text
     7  IGYSC2025-W   "LINK-PARM" or one of its subordinates was
                      referenced, but "LINK-PARM" was a "LINKAGE
                      SECTION" item that did not have addressability.
                      This reference will not be resolved successfully
                      at execution.

Do I need a set statement or something?

Thanks,

-Art

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 16 Mar 2002 03:00:00 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Passing parm hex parm to STCKCONV

2. CALL prog USING parm BY DESCRIPTOR

3. WEBrick, Tofu, Div::Div

4. Problem using DIV

5. GPF while using START(proc)

6. Using REXX in QMF Proc

7. TSR, proc near, proc far

8. PROC within a PROC DD override

9. i need my proc-1 to be the same as an existing proc-2

10. Ho do I invoke proc from within proc

11. using return value of proc

12. Error using ::itcl::code to call a proc defined in class scope

 

 
Powered by phpBB® Forum Software