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
 
Restrition on the use of subscripted data-name's

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

New User


Joined: 07 May 2008
Posts: 1
Location: usa

PostPosted: Tue Sep 16, 2008 8:24 pm    Post subject: Restrition on the use of subscripted data-name's
Reply with quote

Does anyone have a list of COBOL statements that do not allow the use of a data-name reference by a subscript. I want to create a recommendation on how, and where to use subscripted data-names.

Example: valid usage

SELECT OPTIONAL "file-name-1" ASSIGN "assignment-name-1" TO LINE SEQUENTIAL ORGANIZATION IS ACCESS SEQUENTIAL MODE IS " STATUS FILE IS "data-name-1".

Where as the data-name-1 is table-element (table-subscript-1). This look dangerous to code a statement like this, because the subscript must have a valid value before this file can be open or it will generated an run time error.
Does anyone know if the compiler will allow this statement? icon_eek.gif
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 17, 2008 12:03 am    Post subject:
Reply with quote

Hello tposival and welcome to the forums,

Quote:
Does anyone know if the compiler will allow this statement?
Have you tried this? If not, do so and post anything that happens that is not clear.

Quote:
Does anyone have a list of COBOL statements that do not allow the use of a data-name reference by a subscript.
The Language Reference for your compiler is the best source for this kind of info.

Quote:
I want to create a recommendation on how, and where to use subscripted data-names.
Possibly there is something i misunderstand, but i do not understand how such a recommendation would be created. Anything that occurs multiple times must be so referenced, regardless of any recommendation icon_confused.gif As i mentioned, there may be something i misunderstand.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

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