PDRCCM2A
PDRCCM2A converts machine carriage controls to ANSI carriage controls.
Syntax
PDRCCM2A 'indsn outdsn switches'
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. | REXX: No Default JCL: DD:SYSUT1 |
|
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. | REXX: No Default JCL: DD:SYSUT2 |
|
strip | Up to three switches with no intervening spaces. A slash must precede each switch. The first switch specifies the record format to which PDRCCM2A will convert the input, as follows:
|
/F/E | |
The second switch specifies how to pad records inserted into the input print stream, as follows:
|
|||
The third switch, /T, sets PDRCCM2A to issue trace information for every 1,000 records. |
Example
PDRCCM2A 'D966.IN(TEST1) D966.OUT(TEST1) /V/T'
In this example, PDRCCM2A converts machine carriage controls in D966.IN(TEST1)
to ANSI carriage controls in D966.OUT(TEST1)
. PDRCCM2A will convert the record format to VBA (that is, it will remove all spaces from the end of each record) and will issue trace information every 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 PDRCCM2A 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. ***
//*********************************************************************
//** PDRCCM2A ** Convert ANSI to Machine Channel Controls ***
//*********************************************************************
//** PDRCCM2A Parameters: ***
//************** Parm1: Input file name/DD (or * to keep SYSUT1) ***
//************** Parm2: Output file name/DD (or * to keep SYSUT2) ***
//************** Parm3: Options (no space between): ***
//************** /F = Fixed (keep lines same as input) - DEFAULT ***
//************** /V = VBA output (strip blanks from each record) ***
//************** /A = ASCII pad inserted lines (hex 20) ***
//************** /E = EBCDIC pad inserted lines (hex 40)-DEFAULT ***
//************** /T = Trace every 1000 lines ***
//************** Example: PARM='* * /V/A/T' ***
//************** PARM='DD:IN DD:OUT /T' ***
//*********************************************************************
//PDRCCM2A EXEC PGM=PDRCCM2A,PARM='* * /V/T'
//STEPLIB DD DSN=PDR.STREAMW.LOAD,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 PDRCCM2A 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
say 'Enter parameters in the order explained.'
say 'Do not use quotes around dataset names.'
pull in out strip .
if in = '' | out = '' then
call ERROR 8, 'Required parameters indsn and outdsn are missing.'
End
/* Allocate input and output files */
if sysdsn("'"in"'") <> 'OK' then do
say "Input file '"in"' not found:" sysdsn("'"in"'")
exit 4
end
"CALL "loadmod" '''"in"'' ''"out"'' "strip"/T'"
address ISPEXEC "BROWSE DATASET('"out"')"
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: Convert ANSI CC to machine CC. '
say
say 'Syntax:, %'execname' indsn outdsn strip'
say ', , , where: indsn is the input dataset (required).'
say ', , , , , , , Do not include quotes.'
say ', , , , , outdsn is the output dataset (required).'
say ', , , , , , , Do not include quotes.'
say ', , , , , strip are any parameters to pass to the '
say ', , , , , , , load module.'
Return