IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

File Variable


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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
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
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: 1285
Location: Vilnius, Lithuania

PostPosted: Thu Oct 29, 2009 4:41 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Wed Nov 11, 2009 2:54 pm
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: 1285
Location: Vilnius, Lithuania

PostPosted: Wed Nov 11, 2009 2:55 pm
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
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: 1285
Location: Vilnius, Lithuania

PostPosted: Wed Nov 11, 2009 3:25 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Wed Nov 11, 2009 3:37 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Selecting the max value from a file. DFSORT/ICETOOL 3
No new posts Change history of vsam file. JCL & VSAM 3
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts EMPTY file check scenario JCL & VSAM 6
No new posts SORT deletes the SORTOUT file DFSORT/ICETOOL 8
Search our Forums:

Back to Top