Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

help to develop a sort card for removing 12th and 15th digit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Aug 13, 2012 1:41 pm    Post subject: help to develop a sort card for removing 12th and 15th digit
Reply with quote

Can anybody help me out in developing a sort card to remove 12th and 15th digit from a number of 15 digits and replace the two spaces in the end of 13th digit and also first 4 digits will be spaces using sort utility.

Ex: 123400234126417 should look like ' 1234002341241 ' where number 6 and 7 got removed and two spaces at end and four spaces at begeining.
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Aug 13, 2012 1:56 pm    Post subject:
Reply with quote

123400234126417 => 15 bytes

1234002341241 + 6 bytes of spaces => 19 bytes

Are you sure this is your requirement?

If yes

Do you need to remove 12th and 15th digit always?

If Yes
OUTREC FIELDS=(4X,5:1,11,16:13,2,18:13,2,2X)
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Aug 13, 2012 2:19 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

Thank you so much. I used sort card OUTREC FIELDS=(4X,5:1,11,16:13,2,2X) to meet my requirement.

But after 19 digit number i am getting unwnted dots in my output file.How to remove those dots?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Aug 13, 2012 2:40 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

Please show all your sort cards, sample input, expected output and output received.
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Aug 13, 2012 2:41 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

Also please let me know what changes should i do to sort card to insert inverted coma at the begining and at the end of my 19 digit number string?
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Aug 13, 2012 2:49 pm    Post subject:
Reply with quote

i/p: 001234567891012
o/p: 0012345678901 .......................................................................

sort card: SORT FIELDS=COPY
OUTREC FIELDS=(4X,5:1,11,16:13,2,2X)


my o/p is as expected but i don't need extra dots after last spaces. Also o/p should be within inverted comas.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Aug 13, 2012 3:12 pm    Post subject:
Reply with quote

Try this

Code:

      SORT FIELDS=COPY
      OUTREC FIELDS=(4X,5:C'''',6:1,11,17:13,2,19:C'''',61X)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Aug 13, 2012 3:51 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

Code:
  SORT FIELDS=COPY
  OUTREC BUILD=(4X,C'''',1,11,13,2,C'''',80:X)


I've changed FIELDS to BUILD, as FIELDS is somewhat "overloaded". Since all the data appears naturally at the position of the columns previously specified, I have removed the columns. To "pad" the record, put data in the last byte, unreferenced bytes will automatically be filled by DFSORT.

For "inverted commas" you may mean C'"'.
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Aug 13, 2012 3:53 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

using these sort card i got o/p as:

'0012345678901' .My inverted comas must be before 1st four spaces and after 2 spaces at the ending.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Aug 13, 2012 3:55 pm    Post subject:
Reply with quote

Thanks Bill

Vidya,

I believe I had spoon fed you enough.Why not try to understand the card and change it to what is needed?
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Aug 13, 2012 4:05 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

Thank you so much.

I got my o/p using sort card: OUTREC FIELDS=(1:C'''',4X,6:1,11,17:13,2,2X,21:C'''',59X)

icon_smile.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Aug 13, 2012 4:06 pm    Post subject: Reply to: help to develop a sort card for removing 12th and
Reply with quote

Vidya,
As Pandora-Box indicates, you really should be able to do that bit yourself.

If you don't understand how, there are excellent manuals referenced in "stickies" at the top of this forum. Consult them, experiment, and understand what has been shown to you, then the final bit will be easy.

If you don't understand the sort card but go ahead with a solution, what are you going to do when someone asks you to change it? Or document it? Or how to do something similar since you've managed that one?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us