Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

File Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
kumarcoolboy

New User


Joined: 28 May 2009
Posts: 10
Location: Hyderabad

PostPosted: Mon Oct 26, 2009 11:00 am    Post subject: File Variable
Reply with quote

Hello All,

Can someone tell me if we can display the FILE VARIABLE that is being used in a PL/I program ? If yes, then how ??
Back to top
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Oct 26, 2009 12:40 pm    Post subject:
Reply with quote

Kumar,
Can you please elaborate the requirement? Have you checked the builtin functions related to FILE in PLI?
Back to top
View user's profile Send private message
kumarcoolboy

New User


Joined: 28 May 2009
Posts: 10
Location: Hyderabad

PostPosted: Mon Oct 26, 2009 12:49 pm    Post subject: Reply to: File Variable
Reply with quote

hi Srihari,

I have coded a PLI program where in am using FILE VARIABLE. Am passing this as an argument to a procedure am calling. I just want to know the value that is being passed as the argument i.e. the value in the file variable that is being passed. Hope this helps.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1027
Location: Oostende, Belgium

PostPosted: Thu Oct 29, 2009 4:41 pm    Post subject:
Reply with quote

No, you cannot display such data (ditto for task, entry and area variables)

Robert
Back to top
View user's profile Send private message
kumarcoolboy

New User


Joined: 28 May 2009
Posts: 10
Location: Hyderabad

PostPosted: Fri Oct 30, 2009 10:49 am    Post subject:
Reply with quote

ok, thank you very much......
Back to top
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Wed Nov 11, 2009 2:52 pm    Post subject:
Reply with quote

Passing FILE variable to another proc is not appropriate. But we use POINTERs to pass the data. it will improve performance also......
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Nov 11, 2009 2:54 pm    Post subject: Reply to: File Variable
Reply with quote

Quote:
Passing FILE variable to another proc is not appropriate

please explain why not ?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1027
Location: Oostende, Belgium

PostPosted: Wed Nov 11, 2009 2:55 pm    Post subject:
Reply with quote

arivazhagan_k wrote:
Passing FILE variable to another proc is not appropriate.


Says who?
Back to top
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Wed Nov 11, 2009 3:19 pm    Post subject:
Reply with quote

Quote:
please explain why not ?


Suppose file variable holding 10000 bytes instead of passing those bytes information we can pass the pointer. it will improve the program excution speed. If i am wrong i am happy to correct me. Thanks.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1027
Location: Oostende, Belgium

PostPosted: Wed Nov 11, 2009 3:25 pm    Post subject:
Reply with quote

arivazhagan_k wrote:
Quote:
please explain why not ?


Suppose file variable holding 10000 bytes instead of passing those bytes information we can pass the pointer. it will improve the program excution speed. If i am wrong i am happy to correct me. Thanks.


Nuff said, you very obviously don't have a clue what a file variable actually is.

Maybe you should RTFM before you start blabbering away, a file variable has a size of 4 (F O U R) bytes.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Nov 11, 2009 3:37 pm    Post subject: Reply to: File Variable
Reply with quote

to save You the time to look at the manual her is how a file variable is used

Quote:
Use of a file variable also allows you to manipulate a number of files at various times by a single statement. For example:

Code:
DECLARE F FILE VARIABLE,
        A FILE,
        B FILE,
        C FILE;
          .
          .
          .
     DO F=A,B,C;
        READ FILE (F) ...;
          .
          .
          .
     END;


but You could also ... ( given the proper declarations for <some_proc> )
Code:
CALL <some_proc>(A) ;

here is the link
http://publib.boulder.ibm.com/infocenter/ratdevz/v7r5/index.jsp?topic=/com.ibm.ent.pl1.zos.doc/topics/asocds-yyy.htm
Back to top
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Wed Nov 11, 2009 3:43 pm    Post subject:
Reply with quote

hi enrico,

Thanks for the valuable clarification.

hi prino,

Thanks for the correction. I misunderstood file variable with file structure.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us