PDRCMETA
PDRCMETA interprets Metacode in the input print stream to create a readable file.
Syntax
PDRCMETA 'indsn outdsn orig ascii expl start numl'
Parameter | Description | Default | |
---|---|---|---|
indsn | The input data set name or DD name. Do not use quotation marks. Use the format DD:DDName for DDs. In JCL, an asterisk (*) indicates the default DD. In REXX, you must specify the input data set name. |
||
outdsn | The output data set name or DD name. Do not use quotation marks. Use the format DD:DDName for DDs.In JCL, an asterisk (*) indicates the default DD. In REXX, you must specify the output data set name. |
hlq.SEEMETA where hlq is your TSO ID or the default qualifier |
|
orig | One of the following:
|
N | |
ascii | One of the following:
|
N | |
expl | One of the following:
|
Y | |
start | The number of the first record to display. | 1 | |
numl | The number of records to display. | 1000000 |
Example
PDRCMETA 'D96.META'
In this example, PDRCMETA is to interpret Metacode in the input (D96.META
) to create the readable output (hlq.SEEMETA
). The utility will display only an explanation of the Metacode data.
PDRCMETA 'D96.META D96.META.READ N Y Y 1 1000'
In the second example, PDRCMETA is to interpret Metacode in the input D96.META
to create the readable output D96.META.READ
. The utility will not display the original data but will display ASCII data and an explanation of the Metacode for the first 1,000 records.
The REXX exec automatically browses the output data set so you can verify the results.
JCL
The following shows the JCL shipped with the PDRCMETA utility.
//*jobcard
//*********************************************************************
//**Customize: 1. Change STEPLIB to point to the datasets where ***
//** the following are installed at your site. ***
//** - Enrichment load module ***
//** - C runtime library ***
//** 2. Change SYSUT1 and SYSUT2 DDs to be the datasets ***
//** for input and output respectively. ***
//*********************************************************************
//** PDRCMETA ** View a readable Metacode file ***
//** Parameters: ***
//************** Parm1: Input file name/DD ***
//************** Parm2: Output file name/DD ***
//************** Example: PARM='DD:SYSUT1 DD:SYSUT2' ***
//*********************************************************************
//PDRCMETA EXEC PGM=PDRCMETA,PARM='DD:SYSUT1 DD:SYSUT2'
//STEPLIB DD DSN=PDR.STREAMW.LOADCRUN,DISP=SHR
// DD DSN=SYS3.CLIB22.SEDCBASE,DISP=SHR
// DD DSN=SYS3.CLIB22.SEDCLINK,DISP=SHR
//SYSPRINT DD SYSOUT=*//SYSUT1 DD DSN=inputdsn,DISP=SHR
//SYSUT2 DD DSN=outputdsn,DISP=SHR
//*
REXX Code
The following shows the REXX Code shipped with the PDRCMETA utility.
/* REXX ** Convert ANSI CC to machine CC ****************************/
/* Changes: -Created: 02/01/96 DJK */
/* Customize: Change loadmod below to be where Enrichment is */
/* installed. */
/********************************************************************/
loadmod = "'PDR.STREAMW.LOAD(PDRCCM2A)'"
address TSO
arg in out strip .
parse source . . execname .; version = '1.0'
if in = '' | out = '' then do
, Call EXPLAIN
/* REXX ** Create a readable metacode file **************************/
/* Changes: -Created: 02/01/96 DJK */
/* Customize: Change loadmod below to be where Enrichment is */
/* installed. */
/********************************************************************/
loadmod = "'PDR.STREAMW.LOAD(PDRCMETA)'"
address TSO
arg in out l1 l2 l3 start num .
parse source . . execname .; version = '1.0'
if in = '' | out = '' then do
Call EXPLAIN
say 'Enter parameters in the order explained.'
say 'Do not use quotes around dataset names.'
pull in out l1 l2 l3 start num .
if in = '' then
call ERROR 8, 'Required parameter indsn is missing.'
End
saveout = out
if saveout = '.' then saveout = 'SEEMETA'
else if saveout <> '' then saveout = "'"out"'"
else saveout = 'SEEMETA'
if out = '.' then out = 'SEEMETA'
else if out <> '' then out = "''"out"''"
in = "'"in"'"
/* Allocate input and output files */
if sysdsn(in) <> 'OK' then do
say 'Input file' in 'not found:' sysdsn(in)
exit 4
end
in = "'"in"'"
address TSO "CALL "loadmod" '"in out l1 l2 l3 start num"'"
address ISPEXEC "BROWSE DATASET("saveout")"
exit
/*********************************************************************/
/* ERROR - Error exit with message */
/*********************************************************************/
ERROR:
if arg(2) <> '' then say arg(2)
if arg(3) <> '' then say arg(3)
exit arg(1)
/*********************************************************************/
/* EXPLAIN - Self documenting routine */
/*********************************************************************/
EXPLAIN:
say '(c)Precisely'
say ' 'execname' Version' version ' All rights reserved.'
say
say 'Function: Create a readable metacode file. '
say
say 'Syntax:, %'execname' indsn outdsn orig ascii expl start numl'
say ' where: indsn is the input dataset (required).'
say ' Do not include quotes.'
say ' outdsn is the output dataset. Do not include'
say ' quotes. Default is hlq.SEEMETA where'
say ' hlq is your TSO id or default qualifier.'
say ' Since these are positional arguments if you'
say ' specify any other optional arguments and '
say ' want to use the default outdsn, you must '
say ' use a period (.) for outdsn. '
say ' orig is to display the original data. Default: N'
say ' ascii is to display ascii data. Default: N'
say ' expl is to display explanations. Default: Y'
say ' start is the starting line. Default: 1'
say ' numl is the number of records. Default: 1000000'
say ' '
say 'The order of the lines in the output is: original data, ascii'
say 'data, then explanations. Of course depending on the arguments, '
say 'some of these lines may not appear.'
Return