View previous topic :: View next topic
|
Author |
Message |
Bruno Oliveira
New User
Joined: 28 Jan 2010 Posts: 16 Location: Portugal
|
|
|
|
Hi!
What's the simpler way of put the ',' character in position 4 in all records except the last one?
Input:
Output:
If the input have only one record, the output should not have the ',' character.
Thank you in advance,
Bruno Oliveira |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
080
081
082
083
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
DATASORT FROM(IN) TO(OUT) TRAILER USING(CTL1)
/*
//CTL1CNTL DD *
INREC OVERLAY=(4:C',')
SORT FIELDS=(1,3,CH,A)
/*
|
|
|
Back to top |
|
|
Bruno Oliveira
New User
Joined: 28 Jan 2010 Posts: 16 Location: Portugal
|
|
|
|
That works great and is very simple (I didn't knew DATASORT statement)!
Thanks |
|
Back to top |
|
|
|