View previous topic :: View next topic
|
Author |
Message |
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
I have to remove some fields from a file from 4 to 18th position,
they are alphnumeric
Please provide me the syntax
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
At this point of time i am unable to make out the things please help me in giving the syntax.
my data is some what like this-
101b56602
100067k89
10089m90
I want exclude these values |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I want exclude these values |
Which values do you want to exclude exactly?
What is the expected output exactly?
You need to be clearer about what you want to do. |
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Hi,
I have recived another file now and the requirement has bit changed.
The file is like this----
001000750750B058.±cx
001000750750B078.kGä
001000750750B100.kGß
001000750750B185.kGÞ
001000750750B186.kG®
001000750750H164.ïÈ/
001000750751AAAG.þt.
001000750751AAB5.ÐÈ·
001000750751AAD5.þt«
001000750751AAFT.þt¨
001000750751AAGP.þtR
001000750751AAGU.þtù
001000750751AAL1.þu
001000750751AAL5.þuà
001000750751AAL7.þuã
001000750751AASS.±.Ñ
001000750751AAUC.±.º
001000750751AAWT.±Qm
001000750751AA62.Ë.è
I just require last 4 bytes , and i need to create a new file which will have just these 4 bytes. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
You certainly know how to lose friends and win enemies.
Gerry |
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Dear Gcicchet,
Please provide me the solution,
will be greatful to u
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Maybe i have completely missed something, but what purpose is served by copying all of the records to get only the last 4 bytes? Why not simply use the file you have and reference those bytes in whatever process is needed?
When another file is received in yet another format, what will be needed then?
If you better explain what you need to do, we may be able to offer more usable suggestions.
When posting this type of question you need to include the relevant positons in the input and output and the "rules" to get from the input to the output. You also need to mention the recfm and lrecl of the input and output files.
If each file that arrives will be diffeent, your best bet is to take the time to understand the linked material and then you can create new control statements for each new requirement. There are also multiple examples in the forum. |
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Thanks for your response.
This file is been given for a temporary use as our actual files are not working now.
I have been asked to extract the last 4 bytes from this file and create a new file, and this file will be used in further processing. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Assuming your input file has RECFM=FB and the bytes you want are in positions 17-20 (as they appear in your example), you can use this DFSORT job:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OUTREC BUILD=(17,4)
/*
|
|
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Thanks Frank.
I have done using control card for sort as-
SORT FIELDS=COPY
OUTREC FIELDS=(17, 4)
and it worked.
Thank you.
Thanks to all. |
|
Back to top |
|
|
|