View previous topic :: View next topic
|
Author |
Message |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
HI all,
I have an input data set with length 600.
I need to copy only few fields from input data set and add some constant values in the output data set with change in output data set.
The output data set length will be 30.
i need to sort :
1) Based on a pin number from 55 position, length 10 from input data set removing duplicates and write all the output records appending other valueS in the last 10 bytes of output data set record.
2) Also i need to copy the value say account num from 65 to 74 of the same input data set record
Code: |
SORT FIELDS=(55,10,CH,A)
SUM FIELDS=NONE
OUTREC FIELDS=(21:C'IMPO',25:C'BBIM12') |
How can i copy only pin number and account number??
The final format should be
Code: |
99988812346666666666IMPOBBIM12 |
Can you please suggest on this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Joined: 21 Aug 2008 |
You have been around enough to know that sort questions should be posted
to syncort section
or the IBM dfsort section |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 418 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
ALARM BELLS ON
I always have to question why on earth you would only want to copy an account number and a PIN number, unless for nefarious purposes.
Surely this extremely sensitive information is highly confidential, and in all of my years of working within the financial industry, I have never ever come across a request like this. |
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
expat wrote: |
ALARM BELLS ON
I always have to question why on earth you would only want to copy an account number and a PIN number, unless for nefarious purposes.
Surely this extremely sensitive information is highly confidential, and in all of my years of working within the financial industry, I have never ever come across a request like this. |
HI expat,
I gave random numbers only. none of the numbers are real. Infact i don't work for any financial institution.
Hope this make sense..... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Hope this make sense..... |
nope
when posting - in general - You/people should try use application/organisation independent jargon,
after that what You/people do with the data will just be Your problem
the VM xedit way
c /pin/number_of_toilet_paper_rolls/
the ISPF way
c "pin" "number_of_toilet_paper_rolls"
|
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 418 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Ram,
So much for data security; did you build a sort solution? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Isn't that simple what you need?
Code: |
//S1 EXEC SORT
//SORTIN DD *
11113333
11113333
22224444
22224444
55556666
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,6,CH,A)
INREC OVERLAY=(11:C'IMPO',15:C'BBIM12')
SUM FIELDS=NONE |
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Almost that - he needs to copy certain fields from the input record - not the entire input record. IE he needs to BUILD using the two fields that come from the input record and the two constants.
and what a stupid topic title - it gives no indication as to the problem. |
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
enrico-sorichetti wrote: |
Quote: |
Hope this make sense..... |
nope
when posting - in general - You/people should try use application/organisation independent jargon,
after that what You/people do with the data will just be Your problem
c/pin/number_of_toilet_paper_rolls/ |
HI Enrico,
I don't understand what you mean by toilet paper roll. i believe its not required while typing here
however i find a solution as below
Code: |
SORT FIELDS=(55,10,CH,A)
SUM FIELDS=NONE
OMIT COND=(1,1,CH,EQ,C'HD')
OUTREC FIELDS=(1:55,20,21:C'IMPO',25:C'BBIM12') |
again none of the code(s) which i used are/were real...am pretty much aware of what am typing here...they are just random numbers... |
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
Rohit Umarjikar wrote: |
Isn't that simple what you need?
Code: |
//S1 EXEC SORT
//SORTIN DD *
11113333
11113333
22224444
22224444
55556666
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,6,CH,A)
INREC OVERLAY=(11:C'IMPO',15:C'BBIM12')
SUM FIELDS=NONE |
|
thanks for your suggestion and i figured it how to do
Code: |
SORT FIELDS=(55,10,CH,A)
SUM FIELDS=NONE
OMIT COND=(1,1,CH,EQ,C'HD')
OUTREC FIELDS=(1:55,20,21:C'IMPO',25:C'BBIM12') |
|
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
dneufarth wrote: |
Ram,
So much for data security; did you build a sort solution? |
yes i did |
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
enrico-sorichetti wrote: |
Quote: |
Hope this make sense..... |
nope
when posting - in general - You/people should try use application/organisation independent jargon,
after that what You/people do with the data will just be Your problem
c/pin/number_of_toilet_paper_rolls/ |
Also, In future I'll avoid providng generic data...i'll just use keys...i used the term pin and account so the people who suggest me will understand my query better.
Thanks for your suggestion. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
c/pin/number_of_toilet_paper_rolls/ |
It is a change command used by some wierd editors:
c - change
/old text/new text/ |
|
Back to top |
|
|
|