diff --git a/pub/lib/node.cpp b/pub/lib/node.cpp
index 6146796a7f87e60bb8326984042f145f84293381..86c9cc65a8ebd3439d635c4adbe17ffdff75a734 100644
--- a/pub/lib/node.cpp
+++ b/pub/lib/node.cpp
@@ -748,6 +748,31 @@ const RObj CNodeSessionNK::tree_val( const CContext& ctx ) const
 }
 
 
+//**************************************************************************************************
+//* CNodeFile: file-wide information
+//**************************************************************************************************
+
+/*
+const RObj CNodeFile::tree_val( const CContext& ctx ) const
+{
+    int k = ref->get_k( ctx );
+    POlo f = NOlm::mem_get(k);
+    if  ( ctx.dim==CContext::_VI ) {
+        CContext myctx = ctx;
+        myctx.dim = CContext::_1;
+        PObjVecEnu pret( new CObjVecEnu( ctx.nv ) );
+        for ( int ii=0; ii<ctx.nv; ++ii ) {
+            myctx.i = ii;
+//            pret->v[ii]  = f->V[j]->z[var->num]->to_r();
+        }
+        return pret;
+    } else {
+//        return f->V[j]->z[var->num];
+    }
+    return RObjInt( new CObjInt( 0 ) );
+}
+*/
+
 //**************************************************************************************************
 //* CNodeIva: indexed variable node
 //**************************************************************************************************
@@ -770,10 +795,7 @@ const RObj CNodeIva::tree_val( const CContext& ctx ) const
     if ( !(var->pointwise() || var->slicewise() || var->filewise()) && ref->tk )
         throw "reference "+var->var_info()+" does not admit an index";
 
-    // Get k from context:
     int k = ref->get_k( ctx );
-
-    // Proceed with file reference f[k]:
     POlo f = NOlm::mem_get(k);
 
     if ( var->categ == VCateg::NJ ) {
diff --git a/pub/lib/node.hpp b/pub/lib/node.hpp
index 59966ccc81914efc7e807c59165cfb5d32c9ebca..2478908269063006b4670859ae0168320b0d3880 100644
--- a/pub/lib/node.hpp
+++ b/pub/lib/node.hpp
@@ -197,6 +197,28 @@ class CNodeSessionNK: public CNode {
 };
 
 
+//! File-wide information.
+
+class CNodeFile: public CNode {
+ private:
+    RRef1 ref;
+ public:
+    CNodeFile( RRef1 _ref=RRef1( new CRef1() ) ) : ref(_ref) {}
+    const RObj tree_val( const CContext& ctx ) const;
+    void kdep_exec( bool *kd ) const { *kd = true; }
+};
+
+
+//! File-wide information: NJ = number of slices.
+
+class CNodeFileNJ: public CNodeFile {
+ public:
+    CNodeFileNJ( RRef1 _ref=RRef1( new CRef1() ) ) : CNodeFile( _ref) {}
+    void set_coord( CCoord& ret, int k ) const { ret = CCoord("nj", ""); }
+    string tree_info() const { return "nj {number of slices}"; }
+};
+
+
 //! Indexed variable node.
 
 class CNodeIva: public CNode {