IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Output LREC based on specific character


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Thu Jun 23, 2022 6:20 pm
Reply with quote

Hallo, I've a input file with LREC = 1000. Each record contains a char '$' at a unknow position

I'd like to have an output file FB with LREC based on maximum position of the char '$' found in the input file.
In this example should be 50

It's also possible remove the character '$' in the output file at the same time?

Many thanks

marco
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Jun 23, 2022 7:01 pm
Reply with quote

LRECL is an attribute of any dataset (not file). LRECL value is set initially at first creation of any dataset, as a constant; it cannot be changed during the life of this dataset, unless the dataset is re-created from scratch.

When dataset has RECFM=VB, it is possible to change the length of each particular record in the range from 5 bytes to its LRECL value.

When dataset has RECFM=FB, then it is not possible to change the size of each particular record, at all.

In order to change the size of particular records with RECFM=VB by SORT utilities, you need to learn something about SORT parameters (if only you plan to do it by yourself):
- PARSE
- BUILD
- SQZ
- FTOV
- VLTRIM
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Thu Jun 23, 2022 7:10 pm
Reply with quote

Ok, thank you, my output is VB, how can
I do this truncation at a specific character?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Jun 23, 2022 7:11 pm
Reply with quote

calcop69 wrote:
Ok, thank you, my output is VB, how can
I do this truncation at a specific character?

In order to change the size of particular records with RECFM=VB by SORT utilities, first of all you may need to learn something about SORT parameters (if only you plan to do it by yourself):
- PARSE
- BUILD
- SQZ
- FTOV
- VLTRIM

P.S.
There are tons of examples spread across this forum, other internet resources, and available manuals and references on SORT utilities.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Jun 23, 2022 10:05 pm
Reply with quote

1) Use PARSE to extract the part of record before your separator character (C'$').

2) Use BUILD to re-create your record without its part after the C'$'.

3) SQZ and JFY parameters may be not needed with this particular approach.

4) Use FTOV if your input somehow is RECFM=FB; otherwise you may not need it.

5) Use VLTRIM to physically truncate your record to only meaningful characters, without any other bytes at its end.

Please, try to do something with your own hands, and your own mind.
Otherwise it makes no sense to visit the experts forum.
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Fri Jun 24, 2022 2:17 pm
Reply with quote

Thanks, obviously i tried many times before disturbing You but don't undertand how to use the PARSE option.
If the parameter FIXLEN(don't know the position of the char '$') is omitted the sort ends with syntax error. When FIXLEN=50 is specified it works but the LREC of output file is always 1000 and not 50.

//SORTIN DD DISP=SHR,DSN=MYDS.FILE.FB1000
//SORTOUT DD DSN=MYDS.FILE.FB,RECFM=FB,
// DISP=(,CATLG),SPACE=(CYL,(1,5),RLSE)
//SYSIN DD *
OPTION COPY
INREC PARSE=(%01=(ENDBEFR=C'$')),
BUILD=(1:%01)
/*

Using VLTRIM the LREC of output file is a VB 1004, if after i conver it with FTOV always obtain a file FB 1000

SORT FIELDS=COPY
OUTFIL FTOV,VLTRIM=C'$'

The objective is to have an output file with LREC corresponding to the maximum postion(unknow) of the char '$' contained in the input file
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Fri Jun 24, 2022 5:11 pm
Reply with quote

calcop69 wrote:
Thanks, obviously i tried many times before disturbing You but don't undertand how to use the PARSE option.
If the parameter FIXLEN(don't know the position of the char '$') is omitted the sort ends with syntax error. When FIXLEN=50 is specified it works but the LREC of output file is always 1000 and not 50.

//SORTIN DD DISP=SHR,DSN=MYDS.FILE.FB1000
//SORTOUT DD DSN=MYDS.FILE.FB,RECFM=FB,
// DISP=(,CATLG),SPACE=(CYL,(1,5),RLSE)
//SYSIN DD *
OPTION COPY
INREC PARSE=(%01=(ENDBEFR=C'$')),
BUILD=(1:%01)
/*

Using VLTRIM the LREC of output file is a VB 1004, if after i conver it with FTOV always obtain a file FB 1000

SORT FIELDS=COPY
OUTFIL FTOV,VLTRIM=C'$'

The objective is to have an output file with LREC corresponding to the maximum postion(unknow) of the char '$' contained in the input file


1) Please, use the Code button when posting any code or data!!!
Code:
//SORTIN   DD DISP=SHR,DSN=MYDS.FILE.FB1000
//SORTOUT  DD DSN=MYDS.FILE.FB,RECFM=FB,   
//            DISP=(,CATLG),SPACE=(CYL,(1,5),RLSE)
. . . . . . . .   
/*


2) There is no such thing as LREC, there is only LRECL

3) Since you specified explicitly: //SORTOUT DD RECFM=FB, you cannot get anything except RECFM=FB 824.gif

4) When creating a dataset with RECFM=VB, it is not good idea to give the dataset name DSN=......FB

5) when creating a dataset, it is not good idea to name it as DSNAME=...FILE...
It is about the same as naming a new function as VARIABLE(...), or a new JCL as //SYSOUT JOB ...

6)
Code:
 . . . . . . . .
//SORTOUT  DD  DSN=&SYSUID..TESTDATA.VB,
//             DCB=(RECFM=VB,LRECL=1004,BLKSIZE=0),...
//*            LRECL=(data size + 4)
 . . . . . . . . .
//SYSIN DD *
* Stage1: re-build fixed record 1000 bytes without any garbage after '$'
 INREC PARSE=(%1=(ENDBEFR=C'$',FIXLEN=1000)), - cut the garbage
       BUILD=(%1)  - extended the truncated part to 1000 bytes
 SORT FIELDS=COPY
* Stage2: Convert RECFM=FB to RECFM=VB,
* by trimming all trailing spaces (not '$' !!!)
 OUTFIL FTOV,VLTRIM=C' '
 END

That's it
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Fri Jun 24, 2022 6:04 pm
Reply with quote

Probably i'm not able to explain...the scope is to obtain a FB file shorter than the input file, not a VB LRECL=1004....for this sample should be a FB with LRECL=50

Input:
Code:
***************************** Top of Data ******************************
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                  $                     
YYYYYYYYYYYYYYY                      $                                 
**************************** Bottom of Data ****************************


Output(desired):
Code:
----+----1----+----2----+----3----+----4----+----5                     
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                         
YYYYYYYYYYYYYYY                                                         


Code:
//SORTIN   DD DISP=SHR,DSN=AM45.CALC.UNLO1000     
//SORTOUT  DD  DSN=AM45.CALC.UNLOUT1,               
//             DCB=(RECFM=VB,LRECL=1004,BLKSIZE=0),
//             DISP=(,CATLG),SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD *                                   
 INREC PARSE=(%1=(ENDBEFR=C'$',FIXLEN=1000)),     
       BUILD=(%1)                                 
 SORT FIELDS=COPY                                 
 OUTFIL FTOV,VLTRIM=C' '                           
 END                                               
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Fri Jun 24, 2022 6:57 pm
Reply with quote

calcop69 wrote:
Probably i'm not able to explain...the scope is to obtain a FB file shorter than the input file, not a VB LRECL=1004....for this sample should be a FB with LRECL=50

Input:
Code:
***************************** Top of Data ******************************
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                  $                     
YYYYYYYYYYYYYYY                      $                                 
**************************** Bottom of Data ****************************


Output(desired):
Code:
----+----1----+----2----+----3----+----4----+----5                     
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                         
YYYYYYYYYYYYYYY                                                         


Code:
//SORTIN   DD DISP=SHR,DSN=AM45.CALC.UNLO1000     
//SORTOUT  DD  DSN=AM45.CALC.UNLOUT1,               
//             DCB=(RECFM=VB,LRECL=1004,BLKSIZE=0),
//             DISP=(,CATLG),SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD *                                   
 INREC PARSE=(%1=(ENDBEFR=C'$',FIXLEN=1000)),     
       BUILD=(%1)                                 
 SORT FIELDS=COPY                                 
 OUTFIL FTOV,VLTRIM=C' '                           
 END                                               


Just try it!!!!

You can read ANY FB dataset, and EVERY record will be first extended to the value specified in FIXLEN, and then trimmed to its actual length by VLTRIM parameter.

Try to do at least something by yourself, and learn how to analyze the results, and to make appropriate changes if needed.

Without doing this you'll never be able to develop YOUR OWN product, even a minor one. Just blind copying-and-pasting the results of other's work would not help, unless you start trying, and thinking by your own.

P.S.
Are you sure there are spaces, not X'00' or other unprintable characters in your records?

First of all: VERIFY CAREFULLY YOUR INPUT IN HEX MODE!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Jun 24, 2022 7:00 pm
Reply with quote

@calcop69: You should rethink your desired solution. It is of course feasible to solve, but I personally would dislike to have an outcome with every Job run that can be different from the previous ones.
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Fri Jun 24, 2022 7:04 pm
Reply with quote

I tried! But I can't know which value assign to FIXLEN! The position of the character '$' isn't fixed
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Fri Jun 24, 2022 7:08 pm
Reply with quote

calcop69 wrote:
I tried! But I can't know which value assign to FIXLEN! The position of the character '$' isn't fixed


It doesn't matter, at all!!!!!!!!
Please, RTFM, and start thinking.

P.S.
In my examples, I have carefully added the detailed comments - to clarify for you: what, and how it is doing?

After your copy-and-paste process, you have carefully deleted absolutely all of my comments...

This eliminates any my desire to help further....
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Jun 24, 2022 7:10 pm
Reply with quote

@calcop69: You must use FIXLEN=1000 as this is the maximum logical record length w/o RDW. VLTRIM=C' ' will remove the clutter at the end after the parsed field.
What's missing is the fix to write to F(B) dataset once you know the maximum record length after stripping the "$" sign.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Fri Jun 24, 2022 7:36 pm
Reply with quote

I can copy-and-paste my very first response for you.
You still are not able to understand, that your initial plan is absolutely undoable...
Quote:
LRECL is an attribute of any dataset (not file). LRECL value is set initially at first creation of any dataset, as a constant; it cannot be changed during the life of this dataset, unless the dataset is re-created from scratch.

When dataset has RECFM=VB, it is possible to change the length of each particular record in the range from 5 bytes to its LRECL value.

When dataset has RECFM=FB, then it is not possible to change the size of each particular record, at all.
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Fri Jun 24, 2022 7:36 pm
Reply with quote

Joerg.Findeisen wrote:
@calcop69: You must use FIXLEN=1000 as this is the maximum logical record length w/o RDW. VLTRIM=C' ' will remove the clutter at the end after the parsed field.
What's missing is the fix to write to F(B) dataset once you know the maximum record length after stripping the "$" sign.


In fact, this is the problem, there isn't any 'garbage' after the char '$' only blanks (X'40')
I need to write a JCL able to write a FB file with LRECL corresponding to the maximum position of the character '$' found in the input file.
Thank You
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Fri Jun 24, 2022 7:38 pm
Reply with quote

calcop69 wrote:
Joerg.Findeisen wrote:
@calcop69: You must use FIXLEN=1000 as this is the maximum logical record length w/o RDW. VLTRIM=C' ' will remove the clutter at the end after the parsed field.
What's missing is the fix to write to F(B) dataset once you know the maximum record length after stripping the "$" sign.


In fact, this is the problem, there isn't any 'garbage' after the char '$' only blanks (X'40')
I need to write a JCL able to write a FB file with LRECL corresponding to the maximum position of the character '$' found in the input file.
Thank You


Any "undesired blanks" at the end of your data is nothing else but GARBAGE!

You may need:
1) to find the MAXIMUM length of DATA among (thousands?) of your input records.

2) to use any tool for DYNAMIC ALLOCATION of a dataset (not FILE after all!!!!!!!!!) to create new output dataset with just calculated LRECL.

3) this all cannot be done, neither in JCL, nor in SORT. Possible workarounds do not worth this senseless goal. Forget about it.

Period.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 25, 2022 1:15 am
Reply with quote

Your desired result could be achieved using SAS, but I'm not sure anything else would work. You would need a SAS job to analyze the input and determine how long the output data set LRECL must be; this job then creates and submits into the internal reader a second job with the needed LRECL coded in it.

Why two jobs? Because when a job is submitted, pretty much the first thing that JES does is run the job through the converter / interpreter (CI). The CI tokenizes the JCL and JES executes the tokenized JCL. Hence it is not possible, under any circumstances, to determine the LRECL of the data set in one step and use that LRECL in the next (or any subsequent) step.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Sat Jun 25, 2022 3:33 am
Reply with quote

Code:
//*====================================================================
//DELETE   EXEC PGM=IEFBR14,COND=(0,NE)                               
//SORTOUT  DD  DISP=(MOD,DELETE,DELETE),SPACE=(TRK,0),               
//             DSN=&SYSUID..DATA.RECFMFB                             
//*                                                                   
//*====================================================================
//TRUNCFB  EXEC PGM=SYNCTOOL,COND=(0,NE)                             
//TOOLMSG  DD  SYSOUT=*                                               
//SSMSG    DD  SYSOUT=*                                               
//*                                                                   
//SORTIN   DD  *                                                     
 XXX XXXXXXX XXXXXXXXXXX XX XXX XXX XXXXXX XXXXX $ -- GARBAGE --     
 XXXXXX XXXXX $            -- GARBAGE --                             
X $     -- GARBAGE --                                                 
//*                                                                   
//SORTOUT  DD  DISP=(NEW,CATLG),SPACE=(TRK,(1000,1000),RLSE),               
//             RECFM=FB,       LRECL TO BE DEFINED BY SORT           
//             DSN=&SYSUID..DATA.RECFMFB                             
//*                                                                   
//TEMPVB   DD  SPACE=(TRK,(1000,1000)),                               
//             DCB=(RECFM=VB,LRECL=1004,BLKSIZE=0)                   
//*--------------------------------------------------------------------
//TOOLIN   DD  *                                                     
 COPY FROM(SORTIN)    TO(TEMPVB)    USING(TRIM)                       
 SORT FROM(TEMPVB)    TO(TOFBCNTL)  USING(MAXL)                       
 COPY FROM(SORTIN)    TO(SORTOUT)   USING(TOFB)                       
//*--------------------------------------------------------------------
//TRIMCNTL DD  *                                                     
 INREC PARSE=(%1=(ENDBEFR=C'$',FIXLEN=1000)),                         
       BUILD=(%1)                                                     
 SORT FIELDS=COPY                                                     
 OUTFIL FTOV,FNAMES=TEMPVB,VLTRIM=C' '                               
//*                                                                   
//MAXLCNTL DD  *                                                     
 SORT FIELDS=(1,2,BI,D)                                               
 OUTFIL VTOF,FNAMES=TOFBCNTL,                                         
        ENDREC=1,                                                     
        BUILD=(C' INREC PARSE=(%1=(ENDBEFR=C''$'',FIXLEN=',           
               1,2,BI,ADD,-4,EDIT=(TTTT),C')),',                     
               80:X,                                                   
             /,C'       BUILD=(%1)',                                 
             /,C' SORT FIELDS=COPY')                                 
//*                                                                   
//TOFBCNTL DD  SPACE=(TRK,(1,1)),                                     
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)                     
//*                                                                   
//*====================================================================


DSN=&SYSUID..DATA.RECFMFB - LRECL=48
Code:
***************************** Top of Data ******************************
 XXX XXXXXXX XXXXXXXXXXX XX XXX XXX XXXXXX XXXXX                       
4EEE4EEEEEEE4EEEEEEEEEEE4EE4EEE4EEE4EEEEEE4EEEEE                       
077707777777077777777777077077707770777777077777                       
-----------------------------------------------------------------------
 XXXXXX XXXXX                                                         
4EEEEEE4EEEEE44444444444444444444444444444444444                       
077777707777700000000000000000000000000000000000                       
-----------------------------------------------------------------------
X                                                                       
E44444444444444444444444444444444444444444444444                       
700000000000000000000000000000000000000000000000                       
-----------------------------------------------------------------------
**************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Sat Jun 25, 2022 3:51 am
Reply with quote

Code:
//TRIM     EXEC PGM=ICEMAN                                         
//SORTIN   DD DISP=SHR,DSN=&SYSUID..VB1004                         
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DISP=(NEW,PASS),UNIT=SYSALLDA,DATACLAS=NONDC         
//SYSIN    DD *                                                   
  OPTION COPY                                                     
  INREC IFTHEN=(WHEN=INIT,                                         
    PARSE=(%01=(ENDBEFR=C'$',FIXLEN=1000)),                       
      BUILD=(1,4,%01))                                             
  OUTFIL FNAMES=(SORTOUT),REMOVECC,VLTRIM=C' '                     
/*                                                                 
//GETLEN   EXEC PGM=ICEMAN                                         
//SORTIN   DD DISP=(OLD,PASS),DSN=*.TRIM.SORTOUT                   
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DISP=(NEW,PASS),UNIT=SYSALLDA,                       
//            SPACE=(TRK,(2,1)),                                   
//            DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0                 
//SYSIN    DD *                                                   
  OPTION COPY                                                     
  OUTFIL FNAMES=(SORTOUT),REMOVECC,VTOF,NODETAIL,BUILD=(80:X),     
    TRAILER1=(C'MaxLen,5,',MAX=(1,2,BI,M11,LENGTH=5))             
/*                                                                 
//COPY     EXEC PGM=ICEMAN                                         
//SYMNAMES DD DISP=(OLD,PASS),DSN=*.GETLEN.SORTOUT                 
//SORTIN   DD DISP=(OLD,PASS),DSN=*.TRIM.SORTIN                   
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DSN=&SYSUID..RESULT,                                     
//            DISP=(NEW,CATLG),UNIT=SYSALLDA,                     
//            SPACE=(TRK,(2,1)),                                   
//            DSORG=PS,BLKSIZE=0                                   
//SYSIN    DD *                                                   
  OPTION COPY,SOLRF                                               
  INREC IFTHEN=(WHEN=INIT,                                         
    PARSE=(%01=(ENDBEFR=C'$',FIXLEN=1000)),                       
      BUILD=(1,4,%01))                                             
  OUTFIL FNAMES=(SORTOUT),REMOVECC,VTOF,VLTRIM=C' ',BUILD=(MaxLen)
/*
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Sat Jun 25, 2022 4:27 pm
Reply with quote

The last two tricks and gimmicks can work, but the correct and simple (!!! from zOS architecture point of view) problem solving would be: using the attributes RECFM=VB with the same (maximum needed) LRECL for all instances of the output dataset created each time.

This conversion of (RECFM=VB,LRECL=1004) to (RECFM=FB,LRECL=xx) doesn't give any advantages except drawbacks - for future use and maintenance of the system. Also the required disk space would rather increase than decrease, because in average those new "tails of blanks" for each new record RECFM=FB will certainly go beyond the total size of 4-byte RDW fields for all records RECFM=VB.
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Sat Jun 25, 2022 9:55 pm
Reply with quote

Thank You all for the support
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Sun Jun 26, 2022 11:36 am
Reply with quote

An update to remove the extra four Bytes of the RDW in the output, and the unnecessary duplicate PARSE in last step.
Code:
//TRIM     EXEC PGM=ICEMAN                                         
//SORTIN   DD DISP=SHR,DSN=&SYSUID..VB1004                         
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DISP=(NEW,PASS),UNIT=SYSALLDA,DATACLAS=NONDC         
//SYSIN    DD *                                                   
  OPTION COPY                                                     
  INREC IFTHEN=(WHEN=INIT,                                         
    PARSE=(%01=(ENDBEFR=C'$',FIXLEN=1000)),                       
      BUILD=(1,4,%01))                                             
  OUTFIL FNAMES=(SORTOUT),REMOVECC,VLTRIM=C' '                     
/*                                                                 
//GETLEN   EXEC PGM=ICEMAN                                         
//SORTIN   DD DISP=(OLD,PASS),DSN=*.TRIM.SORTOUT                   
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DISP=(NEW,PASS),UNIT=SYSALLDA,                       
//            SPACE=(TRK,(2,1)),                                   
//            DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0                 
//SYSIN    DD *                                                   
  SORT FIELDS=(1,2,BI,D)                                           
  OUTFIL FNAMES=(SORTOUT),                                         
    REMOVECC,VTOF,ACCEPT=1,                                       
    BUILD=(C'MaxLen,5,',1,2,BI,SUB,+4,TO=ZD,LENGTH=5,80:X)         
/*                                                                 
//COPY     EXEC PGM=ICEMAN                                         
//SYMNAMES DD DISP=(OLD,PASS),DSN=*.GETLEN.SORTOUT                 
//SORTIN   DD DISP=(OLD,PASS),DSN=*.TRIM.SORTOUT                   
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DSN=&SYSUID..RESULT,                                 
//            DISP=(NEW,CATLG),UNIT=SYSALLDA,                     
//            SPACE=(TRK,(2,1)),                                   
//            DSORG=PS,BLKSIZE=0                                   
//SYSIN    DD *                                                   
  OPTION COPY,SOLRF                                               
  OUTFIL FNAMES=(SORTOUT),REMOVECC,VTOF,VLTRIM=C' ',BUILD=(MaxLen)
/*
Back to top
View user's profile Send private message
calcop69

New User


Joined: 23 Jun 2022
Posts: 14
Location: Italy

PostPosted: Sun Jun 26, 2022 1:31 pm
Reply with quote

Thanks a lot
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Sort based on the record type DFSORT/ICETOOL 1
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts To Omit records based n SORT condition DFSORT/ICETOOL 6
Search our Forums:

Back to Top