Page 1 of 1

How can we know the files used by an online program?

Posted: Thu Sep 24, 2015 10:39 pm
by utkarsh
Hi,

In an interview there was a question - How can we know the files used by an online program? Is it possible to know the files used by that program with out seeing the source code?

I did not know how can we check this.

And further, if a file is given to us and we don't know if the file can be used online, is there a way to know if it is used in online program?

Re: How can we know the files used by an online program?

Posted: Sat Sep 26, 2015 3:57 pm
by zprogrammer
One way is you could to your CICS region and provide the command

Code: Select all

CEMT I FILE(*) DSN(*)
or

Code: Select all

CEMT I FILE(*) DSN(HLQ.*)
either of them will work and will give you an output like below

Code: Select all

  I FILE(*) DSN(HLQ.*)                                                       
  STATUS:  RESULTS - OVERTYPE TO MODIFY                                         
   Fil(FILE1  ) Vsa Clo Ena Rea Upd Add Bro Del     Sha                        
          Dsn( HLQ.FILE1                           )                   
   Fil(FILE2  ) Vsa Ope Ena Rea Upd Add Bro Del     Sha                        
          Dsn( HLQ.FILE2                           )                   
                                                                                
                                                                                
These are nothing but FCT entries and the value present within FILE(VALUE) VALUE=> Will be used in your online programs

Also Please read about DFHCSDUP
System definition file utility program (DFHCSDUP)
The CICS® system definition utility program, DFHCSDUP, is a component of resource definition online (RDO). DFHCSDUP is an offline utility program that allows you to read from and write to a CICS system definition (CSD) file, either while CICS is running or while it is inactive.

You can use the DFHCSDUP program to:

ADD a group to the end of a named list in a CSD file
ALTER attributes of an existing resource definition
APPEND a group list from one CSD file to a group list in another, or in the same, CSD file
COPY all of the resource definitions in one group or several generically named groups to another group or several other generically named groups in the same, or in a different, CSD file
DEFINE a single resource, or a group of resources, on the CSD
DELETE from the CSD a single resource definition, all of the resource definitions in a group, or all of the group names in a list
EXTRACT data from the CSD and pass it to a user program for processing
INITIALIZE a new CSD file, and add to it CICS-supplied resource definitions
LIST selected resource definitions, groups, and lists
MIGRATE the contents of a table from a CICS load library to a CSD file
LIST a specific APAR
REMOVE a single group from a list on the CSD file
SCAN all IBM®-supplied groups and user defined groups for a resource. The definition of the matched resource in an IBM supplied group is compared to the definition(s) of the corresponding matched resource in the user groups.
SERVICE a CSD file when necessary
UPGRADE the CICS-supplied resource definitions in a primary CSD file for a new release of CICS
VERIFY a CSD file by removing internal locks on groups and lists.
:)

Re: How can we know the files used by an online program?

Posted: Thu Oct 15, 2015 1:28 pm
by utkarsh
Pandora-Box wrote:One way is you could to your CICS region and provide the command

Code: Select all

CEMT I FILE(*) DSN(*)
or

Code: Select all

CEMT I FILE(*) DSN(HLQ.*)
Thanks Pandora this has helped.

Re: How can we know the files used by an online program?

Posted: Tue Oct 20, 2015 6:53 pm
by zprogrammer
Glad it helped

Re: How can we know the files used by an online program?

Posted: Tue Oct 20, 2015 7:30 pm
by enrico-sorichetti
Probably I am picky about the language barrier
How can we know the files used by an online program?
all the replies answered the question
How can we know the files used by CICS

but if really the question was literally
How can we know the files used by an ( specific) online program

then the answer would be
read the source or the program specs :mrgreen:

Re: How can we know the files used by an online program?

Posted: Tue Oct 20, 2015 7:58 pm
by zprogrammer
Ha ha I guess the TS also did read about
These are nothing but FCT entries and the value present within FILE(VALUE) VALUE=> Will be used in your online programs

Re: How can we know the files used by an online program?

Posted: Thu Oct 22, 2015 9:57 am
by utkarsh
I should have mentioned CICS. But I was looking for CICS answer only so it helped. :)