Alan,

Use the following JCL which will give you the desired results.

// SET IDSN='Your Input FB filename to copy with truncation' 
//*************************************************************** 
//* GET THE FILE DCB PROPERTIES USING LISTDS COMMAND            * 
//*************************************************************** 
//STEP0100 EXEC PGM=IKJEFT01,PARM='LISTDS ''&IDSN''' 
//SYSTSPRT DD DSN=&&L,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE), 
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0) 
//SYSTSIN  DD DUMMY 
//* 
//*************************************************************** 
//* READ LISTDS OUTPUT AND CREATE SYMBOL WITH LRECL-1           * 
//*************************************************************** 
//STEP0200 EXEC PGM=SORT 
//SYSOUT   DD SYSOUT=* 
//SORTIN   DD DSN=&&L,DISP=SHR 
//SORTOUT  DD DSN=&&S,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE) 
//SYSIN    DD * 
  INCLUDE COND=(1,3,CH,EQ,C'  F',AND,23,2,CH,EQ,C'PS') 
  OPTION COPY,STOPAFT=1,NULLOUT=RC4 
  INREC BUILD=(C'FILE_LRECL,2,',9,6,UFF,SUB,+1,M11,LENGTH=6,80:X) 
//* 
//*************************************************************** 
//* USE THE SYMBOL TO COPY THE DATASET WITH LRECL-1             * 
//*************************************************************** 
//STEP0300 EXEC PGM=SORT,COND=(0,NE,STEP0200)  
//SYSOUT   DD SYSOUT=* 
//SYMNOUT  DD SYSOUT=* 
//SYMNAMES DD DSN=&&S,DISP=SHR 
//SORTIN   DD DSN=&IDSN,DISP=SHR 
//SORTOUT  DD SYSOUT=* 
//SYSIN    DD * 
  OPTION COPY 
  INREC BUILD=(FILE_LRECL) 
//* 

Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation
Email: [email protected]


IBM Mainframe Discussion List <[email protected]> wrote on 
11/07/2013 07:03:06 AM:

> From: "Storr, Lon A CTR USARMY HRC (US)" <[email protected]>
> To: [email protected], 
> Date: 11/07/2013 07:19 AM
> Subject: DF/Sort: removing a column from fixed records of any length
> (UNCLASSIFIED)
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> Classification: UNCLASSIFIED
> Caveats: NONE
> 
> Hello List,
> 
> Is there a way to remove the first column of data from a fixed record
> without specifying the length of the data to be retained?
> 
> Several dozen files are generated several times a day, all have RECFM=FB 
and
> various LRECLs.
> 
> Every record in each of these files is prefixed by a superfluous blank.
> 
> It would be a simple matter to remove the blank if the records were
> variable: BUILD=(1,4,6) would do it, I believe.
> 
> Is there a single-step process to accomplish this task when the records 
are
> fixed? It makes no difference to the application if the output LRECL is
> equal to the input LRECL (i.e. padded) or LRECL-1 (i.e. truncated).
> 
> Thanks,
> Alan
> 
> 
> 
> Classification: UNCLASSIFIED
> Caveats: NONE
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to