View previous topic :: View next topic
|
Author |
Message |
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
I have a requirement
Input data ( flat file )
Line -1 00000 320000
Line- 2 00000 320000
Line -3 00000 320000
Line -4 00000 320000
Line -5 600601ABCDEKFGSUEHYG58790896897 ABVBHHO 7U089
Line -6 600601CVKJJASJHADJKSD58790896897 ABVBHHO 7U089
Line- 7 600601aGHKJKLJHKJKLJHD58790896897 ABVBHHO 7U089
I want to read the input file , till it gets no spaces in coloumn 7 to 17
i.e. from Line -5 . Then I want to put 5th line data ( coloumn 7 to 17 )
to the 1st 4 records.
Output file should be
Line -1 000001ABCDEKFGS320000
Line- 2 000001ABCDEKFGS320000
Line -3 000001ABCDEKFGS320000
Line -4 000001ABCDEKFGS320000
Line -5 600601ABCDEKFGSUEHYG58790896897 ABVBHHO 7U089
Line -6 600601CVKJJASJHADJKSD58790896897 ABVBHHO 7U089
Line- 7 600601aGHKJKLJHKJKLJHD58790896897 ABVBHHO 7U089 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Which release of which sort product is used on your system?
If you don't know post the informational output from any sort including all message ids and content. |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
SYNCSORT , and ICETOOL is there |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
The other topic has been deleted.
ICETOOL on your system should invoke Synctool. |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
what should be the code to
copy data from 6th line and edit line 1 to 6 of the same file |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
WHich release of Syncsort is being used?
Your example data does not appear to match your "rules". . .
Suggest you review/re-post the input & output sample data (Using the Code tag to perserve alignment improve readability) and review/re-post the rules from the 2 posts that have rules given. |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
I have a requirement
Input data ( flat file )
Line -1 00000########320000
Line- 2 00000########320000
Line -3 00000########320000
Line -4 00000########320000
Line -5 600601ABCDEKFGSUEHYG58790896897 ABVBHHO 7U089
Line -6 600601CVKJJASJHADJKSD58790896897 ABVBHHO 7U089
Line- 7 600601aGHKJKLJHKJKLJHD58790896897 ABVBHHO 7U089
I want to sequentially read the input file , till it gets no '#' in coloumn 6 to 13
i.e. from Line -5 . Then I want to put 5th line data ( coloumn 6 to 13 )
to the 1st 4 records.
Output file should be
Line -1 000001ABCDEKFGS320000
Line- 2 000001ABCDEKFGS320000
Line -3 000001ABCDEKFGS320000
Line -4 000001ABCDEKFGS320000
Line -5 600601ABCDEKFGSUEHYG58790896897 ABVBHHO 7U089
Line -6 600601CVKJJASJHADJKSD58790896897 ABVBHHO 7U089
Line- 7 600601aGHKJKLJHKJKLJHD58790896897 ABVBHHO 7U089 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
chandanhsbc
Rather than repeat or rephrase your requirement, you NEED to answer the question asked by Dick.
He's not asking for the fun of it, but to get some useful information to try and help you. |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Your NEW example does not appear to match your stated requirements, either
The example INPUT you provide has EIGHT '#' characters from column 6 to 13 inclusive, with (in the first 5 records) the value '320000' starting in column 14.
The example OUTPUT you provide has TEN characters (1ABCDEKFGS) from column 6 to 15 being placed in the output field beginning at column 6, and the value '320000' beginning in column 16 - TWO bytes farther to the right than in the input file.
Yet you SAY that you only want to put the 5th line data (column 6 to 13) to the 1st 4 records, NOT the 5th line data (column 6 to 15). Columns 6 to 13 would only include 6th line characters '1ABCDEKF' and not the two additional characters 'GS' from columns 14-15 as shown in your example.
At the least, you need to provide requirements that are not conflicting. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Dick repeatedly wrote: |
Which release of which sort product is used on your system? |
chandanhsbc wrote: |
SYNCSORT , and ICETOOL is there |
Suggest you execute this Job and post the entire SYSOUT here.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DUMMY
//SYSIN DD *
SORT FIELDS=COPY
/* |
|
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Edited post to remove suggested solution, due to ungrateful attitude of TS, as posted in following response.
Gimme, Gimme, Gimme. |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
I am not sure about the syncsort release , and how does it matter from coloumn number and all, thing is I am not getting the resoultion , rather getting lot of lesson on other stuff.
I want to put 5th line data ( from some particular coloumn to some particualr coloumn ) to 1st four line .
Is it possible by any type of sort command?? |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
SYNCSORT FOR Z/OS 1.3.2.1R U.S. PATENTS: 4210961, 5117495 (C) 200
z/OS 1.11.0
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 69D64, MODEL 2097 719
SYSIN :
SORT FIELDS=COPY
WER276B SYSDIAG= 3392034, 5870455, 5870455, 2705025
WER164B 6,884K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 272K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE
WER410B 0 BYTES RESERVE REQUESTED, 156K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER416B BSAM WAS USED FOR SORTIN
WER416B BSAM WAS USED FOR SORTOUT
WER054I RCD IN 0, OUT 0
WER169I RELEASE 1.3 BATCH 0492 TPF LEVEL 2.1 |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
chandanhsbc
You just don't get it do you?
Quote: |
rather getting lot of lesson on other stuff.
|
The 'other stuff' is MORE inportant than your silly resolution.
The reason the release matters is that, the resolution may vary depending on the release. One resolution may not work if the product is not up to the current release.
The 'other stuff' poeple are trying to HELP you with is this:
Should the resolution follow the example in the data?
Or should it follow the example in the rules?
They are different, so which is it?
The 'other stuff' is that if you want help, you need to be able to respond correctly to the questions being asked. This is important.
Most importantly you need to RESPECT those trying to help you for free.
If I were the moderator, I would lock this topic and ban the user.
Just me though. They are nicer than I am. |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
dave it was not for you , it was for coloumn number question
I am just looking to syntax , coloumn number and all should not matter .
For u aksing the release , I am very happy to answer ur question
And sorry if it hurted you.. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I do not take things personally, so no harm there.
I am not hurt in the least bit.
If you just want syntax, then look in the manual.
If you want help from the experts here, then answer ALL of their questions, whether you think it matters or not.
The people helping you today have 30,000 posts combined. Do you think they would ask them if it did not matter? |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
ok.. sure will follow. that....
can I ask you now..
is my requirement clear.. or u want any other detail ?
and can u help me with the resloution ..? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
You should clarify your requirements by answering this from Ronald:
Quote: |
Your NEW example does not appear to match your stated requirements, either
The example INPUT you provide has EIGHT '#' characters from column 6 to 13 inclusive, with (in the first 5 records) the value '320000' starting in column 14.
The example OUTPUT you provide has TEN characters (1ABCDEKFGS) from column 6 to 15 being placed in the output field beginning at column 6, and the value '320000' beginning in column 16 - TWO bytes farther to the right than in the input file.
Yet you SAY that you only want to put the 5th line data (column 6 to 13) to the 1st 4 records, NOT the 5th line data (column 6 to 15). Columns 6 to 13 would only include 6th line characters '1ABCDEKF' and not the two additional characters 'GS' from columns 14-15 as shown in your example.
At the least, you need to provide requirements that are not conflicting. |
Then you can say: I am sorry Ronald, I did not mean to have the gimme, gimme response (showing respect where it is deserved).
Then here can give you his the resolution based on his later comment.
As far as me, my job was the 'other stuff' |
|
Back to top |
|
|
chandanhsbc
New User
Joined: 27 Oct 2009 Posts: 11 Location: pune
|
|
|
|
Well
my requiremt is a simple one , 1st 4 lines of a flat file is having space from coloumn 6 to cloumn 13
I want to pick data which is present in 5th line ( cloumn 6 to 13 ) and update 1st four line with that data only.
I tried doing it , in two steps , using easytrieve .
But I want to knw , if there is any better solution using sort. |
|
Back to top |
|
|
|