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



Hi Ted -

>>> Is PARM a data area name . . . . DTAARA         *YES
>>
>>The DTAARA keyword, along with PGM and FILE, is only for 
>>cross-referencing information.  Anything you want to do 
>>with the data area specified on the command you must do 
>>in your command processing program.
>
>Exactly!  I'm familiar with how this works, but have never 
>seen it done.  I've never done it myself and was wondering 
>if anyone out there had a good example they could share with 
>us as to how it's done.

Okay, here is an example using FILE.  I have a command called CRTDUPFSET
(Create Duplicate File Set).  Its function is to create a duplicate of a
physical file and its associated logical files into another library.

In the command source, the parameter for the original file looks like this:

            PARM       KWD(FILE) TYPE(FILE) MIN(1) FILE(*UNSPFD) +
                         PROMPT('File')
FILE:       QUAL       TYPE(*NAME) LEN(10) MIN(1)
            QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                         SPCVAL((*LIBL) (*CURLIB)) PROMPT('Library')

Note the FILE(*UNSPFD) on the PARM statement.  That means that this
parameter is a file name of "Unspecified" usage.

In a particular CL program I have the command  CRTDUPFSET OR5200TF

When I do DSPPGMREF against that CL program, among other things I see:

Object  . . . . . . . . . . . . . . . . . . :     OR5200TF
  Library . . . . . . . . . . . . . . . . . :       *LIBL
  Object type . . . . . . . . . . . . . . . :       *FILE
  File name in program  . . . . . . . . . . :       OR5200TF
  File usage  . . . . . . . . . . . . . . . :       Unspecified

Without FILE(*IN/*OUT/*UPD/*INOUT/*UNSPFD) on the PARM statement, I would
not see the reference to the file.

It is up to the person creating the command source to make sure that any
PGM/DTAARA/FILE cross-referencing information is correct.  If I had put
DTAARA(*YES) instead of FILE(*UNSPFD) in my CRTDUPFSET command, then
DSPPGMREF for the CL program using CRTDUPFSET OR5200TF command would show
that the program uses data area OR5200TF.

Ken
Southern Wine and Spirits of Nevada, Inc.
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.