PDL to CSV
Peter Bateman
peterbateman808 at hotmail.com
Wed Mar 4 10:04:59 CST 2009
Hi Paul:
I have done somerhing similiar for MOE.
I created a definition for QSHOLIST in the dictionary.
ELE LINE256 c 256
FILE QSHO256
REC QSH0256
ITEM LINE256
Ran QSHOW
QSHOW
SET REPORT DEVICE disc
SHOW ELEMENT DETAIL ALL
EXIT
PHDFM FDL=QSHO256.FDL
CREATE FILE QSHO256
CONVERT/FDL=QSHO256.FDL/PAD=" "/TRUNCATE QSHOLIST.LIS
QTP
; x , y start of element name and the element name length
; z, w element data type with size start and length
; a, b start of description and length
; These numbers you should be able to get by taking a forms ruler
; to QSHOLIST.
Access QSHO256
Temp REC_COUNT
Item REC_COUNT = 1 IF matchpattern ( LINE256 ,' *Element *!& *' )
else 2 IF matchpattern ( LINE256 ,' *Description *!& *' ) &
else 3 IF REC_COUNT = 2 and &
matchpattern ( LINE256 , '@!&*' ) &
else 4 IF REC_COUNT = 2 and &
not matchpattern ( LINE256 , '@!&*' ) &
else 0
TEMP CSV varchar size 2047
Item CSV = LINE256[x;y] + ',' + LINE255 [z;w] + ',' &
IF 1 = REC_COUNT &
else TRUNCATE (CSV ) + ' '+ LINE256[a:b] &
IF 3 = REC_COUNT or 4 = REC_COUNT &
else ' '
Subfile META keep if 4 = REC_COUNT inc CSV
Regards,
Peter Bateman
Subject: PDL to CSV
Date: Mon, 2 Mar 2009 09:10:01 -0800
From: Paul.M.Hodson at gov.bc.ca
To: powerh-l at lists.sowder.com
Hello,
We about 6000 elements in a OpenVMS powerhouse dictionary and would like to list the element with description in an excel spreadsheet.
Does anyone have a utility to take PDL( specifically elements) and produce a CSV format?
So for example
Input
Element ACCPAC_SIN_FIRST3 CHARACTER Size 5 &
Default Item Datatype CHARACTER SIZE 5 &
Description "First 3 digits of the Social Insurance Number from the " &
"Accounts Receivable. Separately contained in the AR. " &
Output like...
ACCPAC_SIN_FIRST3
CHARACTER Size 5
First 3 digits of the Social Insurance Number from the Accounts Receivable. Separately contained in the AR.
Alternative may be access to the metadata structures but I am not sure if that access is available.
Thanks in advanced.
Paul
_________________________________________________________________
Reinvent how you stay in touch with the new Windows Live Messenger.
http://go.microsoft.com/?linkid=9650731
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20090304/837260b9/attachment-0001.htm
More information about the powerh-l
mailing list