DAG Consulting

209 N 85th St
Mesa, AZ 85207
(480) 201-7953


M2K Downloads

Create a DAG module in all your accounts. Copy the source code into the DAG.BP file and compile using the M2K tools EDP or BX.

Source Code Description Comment
B Browser Utility Sends terminal output to a PWS Browser Window
FILEINFO File Information Utility Displays File Information Quickly.
Supports all different file types.
GET_DIR_INFO Get DIR( ) Information from a Directory Type file for an Item. Use GET_DIR_INFO from a Basic Program, RPC, or in an I-Descriptor to retrieve Date, Time, Size, or Permissions. Below are the Subroutine Arguments
Usage: GET_DIR_INFO(Answer, "InputType", "FileName", "ItemName", Flag)
AnswerReturned Value dependant upon InputType
FileNameName of DIR type File. FileName is optional if calling from an I-Descriptor via UniQuery.
ItemNameItem Name you wish to see information.
FlagError messages sent back to the calling program.
DAG_ADD_DICTS Add Directory entries quickly and easily from within a Paragraph or Basic Program. Use DAG_ADD_DICTS from a Paragraph or Basic Program
Send the following in DATA statements:
  • DATA Filename (The filename in which the dictionaries will be added, use &FILE.NAME& for a temporary MT420 file.)
  • DATA ~|^ (The Attribute, Value, and Sub Value Mark replacement characters.)
    Now DAG_ADD_DICTS goes into a loop reading in each Dictionary Entry. Every ~ will be a different Attribute so you can put in as many as needed to fill out your dictionary record.
    Some Examples, extra white space is ignored so that you can line things up:
  • DATA @ID      ~D~0~    ~Column|Heading   ~10L~S
  • DATA Sales_Amt~D~1~MD2,~Monthly|Sales Amt~14R~MV~Sales_Data
  • DATA Sales_Rep~D~2~    ~Sales|Rep        ~ 3R~MV~Sales_Data
  • DATA END (Stops Input loop of dictionary entries)
OPT.DISP.B4.AFT.SUB Displays Option Descriptions along with the Option for M2K Screens. Use OPT.DISP.B4.AFT.SUB in a M2K Screen. On the prompt that has Options and Option Descriptions go to screen C2 and add OPT.DISP.B4.AFT.SUB in the Before Display prompt. Don't forget to add the extra display room on screen C1 just like you would for a validation display.
ITRANS An I-Descriptor subroutine that will allow you to TRANS to an I-Descriptor. Usage: SUBR('ITRANS', TargetFile, TargetId, IDescName, ReturnCode)
  • X  Return a null if not found
  • C  Return the code that failed
  • V  Return verbose error message