Exporting APL Namespace to external xxx.dyalog file

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Exporting APL Namespace to external xxx.dyalog file

Postby woody on Sun May 28, 2017 4:57 pm

Greetings,

What is an easy way to EXPORT an APL Namespace (DyalogAPL v15) to an external xxxx.dyalog Windows file ?

And.. the reverse, also .. IMPORTING an APL Namespace into APL Workspace as a Namespace ?

)wsid
is .\food.dws

)OBS
SQA

)CS SQA
#.SQA

)fns
Apl2Scar BrowseConnect Cancel Close Columns Connect CursorName DSN DefaultXlate Describe Do Exec ExecDirect ExecN Fetch FileVersion GetData GetInfo GetWarning Init NativeSQL
Parse Prepare PutData Scar2Apl SetColumns SetData SetDelete SetExec SetInsert SetPrepare SetUpdate Tables Transact Tree TypeInfo X buildcovers dxlate ⍙SQAPL ⍙SQAParse

)vars
⍙dllname ⍙naedfns

⍝ How do I EXPORT this SQA Namespace to external windows file SQA.Dyalog ??

⍝ This question is not only about SQA.dyalog .. but about any namespace (in general)


Sincere thanks!

//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Exporting APL Namespace to external xxx.dyalog file

Postby Adam|Dyalog on Sun May 28, 2017 10:20 pm

If you just want a single .dyalog file,
      ]Save myns \mypath\
should do the job. Just watch out for trains – they currently don't get saved properly.
User avatar
Adam|Dyalog
 
Posts: 135
Joined: Thu Jun 25, 2015 1:13 pm

Re: Exporting APL Namespace to external xxx.dyalog file

Postby woody on Wed Jun 07, 2017 11:28 am

How about this scenario:

)CLEAR

)COPY MYOLDWS ProgA ProgB VarX VarY

)FNS
ProgA ProgB

)VARS
VarX VarY

)SAVE MYWS

⍝ How can I export the APL Workspace (MYWS) contents (2 FNS and 2 VARS) into an external MYNS.Dyalog file on Windows?

⍝ Manually with keyboard command like ]save is OK

⍝ And also with APL system function so this activity can be automated


Thanks in advance!

//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Exporting APL Namespace to external xxx.dyalog file

Postby Adam|Dyalog on Wed Jun 07, 2017 12:06 pm

      ⎕SE.SALT.Save' \tmp\',⍨'MYNS'⎕NS ⎕NL-⍳9
User avatar
Adam|Dyalog
 
Posts: 135
Joined: Thu Jun 25, 2015 1:13 pm

Re: Exporting APL Namespace to external xxx.dyalog file

Postby woody on Wed Jun 07, 2017 5:09 pm

Bingo! Works like a charm...

Thanks!
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Exporting APL Namespace to external xxx.dyalog file

Postby ray on Fri Jun 09, 2017 2:12 am

Hi Adam,

I had some problems with your solution, it kept failing for me with a VALUE ERROR!

I finally traced the problem.
Copied from my session (without editing)
Code: Select all
          )clear   
clear ws
       'xyz'⎕NS ⎕NL-⍳9
VALUE ERROR
      'xyz'⎕NS ⎕NL-⍳9
     ∧

      'xyz'⎕NS ⎕NL-⍳9

      'xyz'⎕NS ⎕NL-⍳9
VALUE ERROR
      'xyz'⎕NS ⎕NL-⍳9
     ∧


Why did it work sometimes and not others?

It failed when the Object Syntax exposed the ROOT properties!
Code: Select all
          )clear   
clear ws

      ⎕NL -⍳9
 APLVersion  ActivateApp  Aplmon  Caption  ChildList  ChooseFont  Coord  CursorObj  DDE  Data  DateToIDN  DeleteTypeLib  DevCaps  DisplayChange  EdgeStyle  EvaluationDays  Event  EventList
       ExitApp  ExitWindows  Flush  FontCancel  FontList  FontOK  FontObj  GetBuildID  GetCommandLine  GetCommandLineArgs  GetEnvironment  GetFocus  GetFocusObj  GetServiceState  GetTextSiz
      e  GreetBitmap  HintObj  IDNToDate  IconObj  Idle  KeepOnClose  LastError  ListTypeLibs  MethodList  NameFromHandle  OLEControls  OLEServers  Posn  PrintList  PropList  RadiusMode  Se
      rviceNotification  SetInputEncoding  SetOutputEncoding  SetServiceState  SetUnicodeTable  ShowSIP  Size  SysColorChange  TCPGetHostID  TextSize  TipObj  Translate  Type  Wait  WinIniC
      hange  XRange  YRange  Yield  xyz

      ⎕NS ⎕NL-⍳9
VALUE ERROR
      ⎕NS ⎕NL-⍳9
     ∧


Is this a bug?
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 221
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest