Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
In which program the FILE CONTROL will be defined

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Poha Eater

New User


Joined: 31 Aug 2016
Posts: 43
Location: India

PostPosted: Thu Jun 28, 2018 9:02 pm    Post subject: In which program the FILE CONTROL will be defined
Reply with quote

Hi All,

I wanted your inputs for a certain situation. There is a program 'PGMA' which can either call 'PGM1' or 'PGM2' based on certain condition.

There is a PS file, FILE1, which is being written when it is going in PGM1 or PGM2 and the records will keep appending until the termination of the program. So in which program i need to define the FILE CONTROL for the file definition of FILE1 when the program is being compiled using DYNAM option.

1. In PGMA only ?
2. In PGM1 and PGM2 ?
3. In PGMA, PGM1 and PGM2 ?

In case of NODYNAM compiler option i think we need to define the FILE CONTROL only in PGMA in above scenario. Please correct me if i am mistaken.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8389
Location: Dubuque, Iowa, USA

PostPosted: Thu Jun 28, 2018 9:59 pm    Post subject: Reply to: In which program the FILE CONTROL will be defined
Reply with quote

Have you looked at the EXTERNAL file example starting on page 518 of the Enterprise COBOL V6R2 Programming Guide manual? If not, you should look at it. The FILE-CONTROL, FILE SECTION, and WORKING-STORAGE file status variable are repeated in every program referencing the file via use of a copy book to standardize their access.
Quote:
In case of NODYNAM compiler option i think we need to define the FILE CONTROL only in PGMA in above scenario. Please correct me if i am mistaken.
So according to the manual, you are mistaken -- FILE-CONTROL must be present in PGMA, PGM1, PGM2 (along with the FILE SECTION and the WORKING-STORAGE file status variable). Note that none of the manuals discuss EXTERNAL in reference to the NODYNAM compile option, so it would appear there is no relationship between NODYNAM and EXTERNAL files.
Back to top
View user's profile Send private message
Poha Eater

New User


Joined: 31 Aug 2016
Posts: 43
Location: India

PostPosted: Fri Jun 29, 2018 2:20 pm    Post subject:
Reply with quote

Hi Robert,

Thanks for pointing out the exact topic in the Manual and sharing the answer. Really thanks for the guidance. It provides the required information.


Thanks Rohit for your reply.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISPF 3.4 edit of a ps file, disp use... Carrie Da Silva TSO/ISPF 1 Fri Sep 21, 2018 3:01 am
No new posts How to find if segment is read in any... Priyanka AR IMS DB/DC 3 Thu Sep 20, 2018 1:34 pm
No new posts U0437 to execute IMS DC program Vkp321 IMS DB/DC 6 Wed Sep 19, 2018 8:39 pm
No new posts ICETOOL - Finding keys within a file nartcr DFSORT/ICETOOL 10 Mon Sep 17, 2018 6:39 am
No new posts Remove selected duplicate rows from t... hnharish DFSORT/ICETOOL 3 Wed Sep 05, 2018 3:11 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us