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
 

 

SORT- outrec

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

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Tue Sep 27, 2016 12:50 am    Post subject: SORT- outrec
Reply with quote

Hi All,

Need your help.

My i/p file looks like this

Code:
28ZZ248021  1


O/P file should be like this

Code:
28ZZ248021811


Could you please help me on this.

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Sep 27, 2016 1:02 am    Post subject: Reply to: SORT- outrec
Reply with quote

Why don't you just use INREC to OVERLAY C'81' at the relevant column?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Tue Sep 27, 2016 1:10 am    Post subject:
Reply with quote

By now, you should know this belongs to DFSORT/ICETOOL
Moved to DFSORT/ICETOOL.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Tue Sep 27, 2016 1:15 am    Post subject: Reply to: SORT- outrec
Reply with quote

Multiply the digit at column 1 by 160,000 and add the digit at colum 2, then subtract 4 times the digit at column 5, then add 2 times the digit at coumn 6, then subtract the digit at column 7, then divide by 80,000 then add the sum of digits at column 5 and column 6 to get the digit at column 11.

Once you get the digit at column 11, take the square root of that digit and multiply by 9. Multiply the number with itself and divide by 8. Divide this number by 3 and add the digits left. Subtract this sum by what you had got at column 11 and that makes column 12.

Print using keyboard numeric pad.

.
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Tue Sep 27, 2016 7:08 am    Post subject:
Reply with quote

RahulG31, may be I am still not awake enough, but is there really some logic behind the long mathematics you just mentioned, or the solution is just as simple as OVERLAY for this query with 81?
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 236
Location: Cincinnati OH USA

PostPosted: Tue Sep 27, 2016 7:27 am    Post subject:
Reply with quote

Kerry,

Probably a tongue in cheek response.

I think it was unnecessary, but perhaps another point was being made.

Dave
Back to top
View user's profile Send private message
Kerry Ropar

New User


Joined: 14 Sep 2016
Posts: 25
Location: Australia

PostPosted: Tue Sep 27, 2016 7:48 am    Post subject:
Reply with quote

ahhh and I ended up thinking more about RahulG31's response more than ram_vizag's query .. icon_lol.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Tue Sep 27, 2016 5:26 pm    Post subject:
Reply with quote

Quote:
more than ram_vizag's query

which did not explain where the '81' was from and someone who has been a member for 8 years should know how to post. He deserved to have his post deleted.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Tue Sep 27, 2016 6:59 pm    Post subject:
Reply with quote

Ram,
In addition to using code tags where appropriate, one of the attributes of a good post is not only the input and desired output, but also the RULE defining how you get from input to desired output. You left out that last rule.
Back to top
View user's profile Send private message
sergeyken

New User


Joined: 29 Apr 2008
Posts: 37
Location: Maryland

PostPosted: Wed Sep 28, 2016 1:21 am    Post subject: Re: Reply to: SORT- outrec
Reply with quote

RahulG31 wrote:
Multiply the digit at column 1 by 160,000 and add the digit at colum 2, then subtract 4 times the digit at column 5, then add 2 times the digit at coumn 6, then subtract the digit at column 7, then divide by 80,000 then add the sum of digits at column 5 and column 6 to get the digit at column 11.

Once you get the digit at column 11, take the square root of that digit and multiply by 9. Multiply the number with itself and divide by 8. Divide this number by 3 and add the digits left. Subtract this sum by what you had got at column 11 and that makes column 12.

Print using keyboard numeric pad.

.


The original idea invented by Lewis Carroll:
How to calculate (2 + 1)?

Quote:
"Two added to one--if that could but be done,"
It said, "with one's fingers and thumbs!"
Recollecting with tears how, in earlier years,
It had taken no pains with its sums.

"The thing can be done," said the Butcher, "I think.
The thing must be done, I am sure.
The thing shall be done! Bring me paper and ink,
The best there is time to procure."

The Beaver brought paper, portfolio, pens,
And ink in unfailing supplies:
While strange creepy creatures came out of their dens,
And watched them with wondering eyes.

So engrossed was the Butcher, he heeded them not,
As he wrote with a pen in each hand,
And explained all the while in a popular style
Which the Beaver could well understand.

"Taking Three as the subject to reason about--
A convenient number to state--
We add Seven, and Ten, and then multiply out
By One Thousand diminished by Eight.

"The result we proceed to divide, as you see,
By Nine Hundred and Ninety Two:
Then subtract Seventeen, and the answer must be
Exactly and perfectly true.

"The method employed I would gladly explain,
While I have it so clear in my head,
If I had but the time and you had but the brain--
But much yet remains to be said.

"In one moment I've seen what has hitherto been
Enveloped in absolute mystery,
And without extra charge I will give you at large
A Lesson in Natural History."

In his genial way he proceeded to say
(Forgetting all laws of propriety,
And that giving instruction, without introduction,
Would have caused quite a thrill in Society),


You can check yourself:
(2 + 1) = (3 + 7 + 10) * (1000 - 8) / 992 - 17 = 3
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Wed Sep 28, 2016 3:02 am    Post subject: Reply to: SORT- outrec
Reply with quote

I didn't know that. But, as they say, 'Great Minds Think Alike'.

.
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