View previous topic :: View next topic
|
Author |
Message |
induajayrose Warnings : 2 New User
Joined: 25 Jul 2005 Posts: 28 Location: Thrissur
|
|
|
|
Hi...
Consider I have a file whose record length is 200.Now I want an output file with its first 100 characters replaced with * .Can any suggest a method.
regards,
Indu |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
Hi Indu,
Apply Boundries from 1st colums to the 100th column.
Apply the following commands,
BNDS 1 100
C ALL P'=' '*'
Note: If you don't apply boundries, u are going to replace the whole file with '*'s.
~Vamsi |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Even shorter: C ALL P'?' '*' 1 100
O. |
|
Back to top |
|
|
rajrohith
New User
Joined: 15 Apr 2005 Posts: 54 Location: chennai
|
|
|
|
hai
can u give examples
where have to give this command |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
where have to give this command |
Open your dataset in EDIT mode and at COMMAND Prompt type these commands one after one and hit ENTER... as you may not find "?" on your keyboard.
Code: |
Command ===> BNDS 1 100 Scroll ===> CSR
****** ***************************** Top of Data ****************************** |
Code: |
Command ===> C ALL P'=' '*' Scroll ===> CSR
****** ***************************** Top of Data ****************************** |
|
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Can use this step if want to do the same in batch.
Code: |
//STPU0000 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=MY.INPUT.DATA <-----LENGHT 200,FB
//SORTOUT DD DSN=MY.OUTPUT.DATA <----LENGHT 200,FB
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(100C'*',101,100) |
David P. |
|
Back to top |
|
|
kavitha81
New User
Joined: 21 Nov 2006 Posts: 6 Location: bangalore
|
|
|
|
OUTREC FIELDS=(100C'*',101,100)
Can you specify what this 101,100 means...
regards,
Kavitha |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Kavitha,
Quote: |
OUTREC FIELDS=(100C'*',101,100)
Can you specify what this 101,100 means... |
Here In o/p file we want to put * from 1 to 100 bytes & bytes starting from 101 & offset 100( means till 200th byte) we want to copy same as i/p file.
Eg:
i/p file
Code: |
bytes 12345............100101102..........................200
aaaaaaaaaaaaaaaaaa b b b |
o/p File
Code: |
bytes 12345............100101102..........................200
***************** b b b |
|
|
Back to top |
|
|
|