View previous topic :: View next topic
|
Author |
Message |
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
Hi,
I want to pass value from a PARM to COBOL pgm. Could I use the parm value in Array?
02 X-TAB-05 OCCURS 1 TO PARM1-REC TIMES
DEPENDING ON X-05
INDEXED BY X-IND-05. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you searched the forum / manuals for reading values from PARM.
Once you have read the value you can use it however you want. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can even redefine the parm value as a COBOL Internal table in linkage section.
but, maybe that is too much information. |
|
Back to top |
|
|
priyanka.msharma Warnings : 1 New User
Joined: 28 Jan 2009 Posts: 12 Location: India
|
|
|
|
02 X-TAB-05 OCCURS 1 TO PARM1-REC TIMES
DEPENDING ON X-05
INDEXED BY X-IND-05.
question is..can I use PARM1-REC in occurs clause?? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
question is..can I use PARM1-REC in occurs clause?? |
Did you check the manual (link at the top of the page)? The COBOL Language Reference clearly states that OCCURS integer-1 TO integer-2 TIMES is the syntax. I'm sure if you search enough you will discover that COBOL means integer numbers only when it says integer-2 -- NOT VARIABLES. Per the manual, I believe the answer to your question is no, you cannot use PARM1-REC in the OCCURS clause. |
|
Back to top |
|
|
|