IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORT CARD


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Thu Mar 01, 2018 4:55 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 01, 2018 6:24 am
Reply with quote

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
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 418
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Thu Mar 01, 2018 6:35 am
Reply with quote

www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.icea100/outcst.htm will help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 01, 2018 12:52 pm
Reply with quote

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
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Thu Mar 01, 2018 8:10 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 01, 2018 8:20 pm
Reply with quote

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"

icon_cool.gif
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 418
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Mar 02, 2018 12:36 am
Reply with quote

Ram,

So much for data security; did you build a sort solution?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Mar 02, 2018 9:34 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Mar 03, 2018 3:28 am
Reply with quote

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
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Sat Mar 03, 2018 3:43 am
Reply with quote

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/ icon_cool.gif


HI Enrico,

I don't understand what you mean by toilet paper roll. i believe its not required while typing here icon_razz.gif

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
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Sat Mar 03, 2018 3:44 am
Reply with quote

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 icon_smile.gif

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
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Sat Mar 03, 2018 3:47 am
Reply with quote

dneufarth wrote:
Ram,

So much for data security; did you build a sort solution?


yes i did
Back to top
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Sat Mar 03, 2018 4:07 am
Reply with quote

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/ icon_cool.gif


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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Mar 03, 2018 1:42 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
Search our Forums:

Back to Top