> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:[EMAIL PROTECTED] On Behalf Of R.S.
> Sent: Friday, February 08, 2008 4:18 AM
> To: [email protected]
> Subject: Two COBOL questions
>
>
> Both questions regard COBOL
>
> 1. JCL EXEC ...,PARM='parameter'
> Can I read data from PARM field in EXEC statement ?
Yes.
> Any ACCEPT ?
No.
OK, some example code that I have:
<code>
LOCAL-STORAGE SECTION.
01 USABLE-PARM PIC X(120).
LINKAGE SECTION.
01 MVS-PARM.
05 MVS-PARM-LENGTH PIC S999 USAGE BINARY.
05 MVS-PARM-VALUE PIC X(120) .
...
PROCEDURE DIVISION USING MVS-PARM.
MOVE SPACES TO USABLE-PARM.
IF MVS-PARM-LENGTH > 0 THEN
MOVE MVS-PARM-VALUE(1:MVS-PARM-LENGTH) TO USABLE-PARM.
END-IF
>
> 2. Dynamic allocation
> Can I use permanent dataset without DDNAME ?
Yes.
> In other words can I specify dataset name instead of ddname ?
Yes.
Enterprise COBOL allows for dynamic allocation of files. Use the FD and
ASSIGN as you currently do. Do not include a DD. Instead, before doing
the OPEN, set an environment variable to contain the necessary
information, including the DSN.
Reference on the ASSIGN in COBOL.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR31/4.2.
3
How to set an environment variable using Language Environment:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA3170/2.2.
5.31
Note also that you can use the ENVAR LE parameter in the PARM= on the
EXEC.
Curiousity: why do you want to do this?
>
> --
> Radoslaw Skorupka
> Lodz, Poland
--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology
The information contained in this e-mail message may be privileged
and/or confidential. It is for intended addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html