View previous topic :: View next topic
|
Author |
Message |
Sebin89
New User
Joined: 14 Dec 2020 Posts: 10 Location: Germany
|
|
|
|
I was trying to suppress the leading zeros of a file using ICETOOL. but it is also removing spaces in that file. Could you please help me to modify control statement to get the expected output?
INPUT:
Code: |
=COLS> ----+----1----+----2
****** ********************
000001 0000/0000000123 123
000002 0000/0000001234 123
000003 0000/0000012345 123
000004 0000/0000123456 123
|
OUTPUT:
Code: |
=COLS> ----+----1----+----2
****** *********************
000001 0000/123123
000002 0000/1234123
000003 0000/12345123
000004 0000/123456123
|
CNTL Used:
Code: |
INREC BUILD=(1,5,06,15,UFF)
OUTFIL FNAMES=COP1OUT,
BUILD=(
1,4,
C'/',
6,15,SQZ=(SHIFT=LEFT))
END
|
expected output:
Code: |
=COLS> ----+----1----+----2
****** *********************
000001 0000/123 123
000002 0000/1234 123
000003 0000/12345 123
000004 0000/123456 123
|
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2024 Location: USA
|
|
|
|
1) reformat the first column using
Code: |
BUILD=(...,6,10,ZD,EDIT=(IIIIIIIIIT),...) |
2) use JFY (not SQZ) to move left
Code: |
BUILD=(...,6,15,JFY=(SHIFT=LEFT),...) |
It’s up to you: to decide how to do two conversions in one single pass. Several ways are possible. |
|
Back to top |
|
|
Sebin89
New User
Joined: 14 Dec 2020 Posts: 10 Location: Germany
|
|
|
|
many thanks for the hint.
Used CNTL:
Code: |
INREC BUILD=(1,5,6,10,ZD,EDIT=(IIIIIIIIIT),16,5)
OUTFIL FNAMES=COP1OUT,
BUILD=(
1,4,
C'/',
6,15,JFY=(SHIFT=LEFT))
END
|
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1257 Location: Bamberg, Germany
|
|
|
|
Instead of EDIT=() as suggested by sergeyken, you can also use predefined Edit Mask Patterns. In this case this would be M10. Just saying. |
|
Back to top |
|
|
Sebin89
New User
Joined: 14 Dec 2020 Posts: 10 Location: Germany
|
|
|
|
Many thanks for the suggestions. Both are working for me.
Just in curiosity; Could you please explain the working of below statements?
Code: |
BUILD=(...,6,10,ZD,EDIT=(IIIIIIIIIT),...)
|
What is ZD and EDIT=(IIIIIIIIIT) do here?
What is the significant of JFY here?
What changes is M10 making here? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2024 Location: USA
|
|
|
|
Sebin89 wrote: |
Many thanks for the suggestions. Both are working for me.
Just in curiosity; Could you please explain the working of below statements?
Code: |
BUILD=(...,6,10,ZD,EDIT=(IIIIIIIIIT),...)
|
What is ZD and EDIT=(IIIIIIIIIT) do here?
What is the significant of JFY here?
What changes is M10 making here? |
Shame on those who are not able to read technical manuals, even after receiving detailed hints.
The thing happened which I was afraid of: you have copied-and-pasted the given solution, without a minor attempt to understand it.
Sorry, but this is a trained monkey's behavior.
|
|
Back to top |
|
|
Sebin89
New User
Joined: 14 Dec 2020 Posts: 10 Location: Germany
|
|
|
|
many thanks for all the help and links. as a beginner its really helping me.
sergeyken, it is not about copy and paste or something. it is all about learning. as someone says there is no stupid questions only stupid answers. small hints, links etc do a lot for beginner. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1257 Location: Bamberg, Germany
|
|
|
|
Sebin89 wrote: |
many thanks for all the help and links. as a beginner its really helping me. |
See also https://www.ibmmainframeforum.com - Mainframe Tech Help Forum for Beginners. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2024 Location: USA
|
|
|
|
Sebin89 wrote: |
many thanks for all the help and links. as a beginner its really helping me.
sergeyken, it is not about copy and paste or something. it is all about learning. as someone says there is no stupid questions only stupid answers. small hints, links etc do a lot for beginner. |
You are given particular examples of control statements.
Next, it should be your responsibility to find detailed description of those statements, and parameters from any of available manuals, and to understand: why these particular solutions suggested, and how they work.
If one cannot do this simple task, that demonstrates his inability to understand technical literature, also to perform his further tasks, requiring a little more thinking with his own mind. |
|
Back to top |
|
|
|