Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : By coding TIME=1440 or TIME=NOLIMIT, It will give a job or step an unlimited amount of time.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


Help in Multiplcation of decimal constant

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
jathampy
Member


Joined: 26 Sep 2009
Posts: 18
Location: software engineer

PostPosted: Thu Jul 29, 2010 4:12 am    Post subject: Help in Multiplcation of decimal constant Reply with quote

My requirement is to multiply a packed decimal field with a decimal constant 0.0256.

The input file is of record length 80 and the packed decimal field is at position 54 of length 5. The multiplication output need to be stored at postion 81-85

Could you please help me to correct the following OUTREC statement to handle the multiplication of the decimal constant +0.0256.

OUTREC BUILD=(1,80,54,5,PD,MUL,+0.0256,TO=PD,LENGTH=5)
Back to top
View user's profile Send private message

Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 510
Location: San Jose, CA

PostPosted: Thu Jul 29, 2010 4:25 am    Post subject: Reply with quote

DFSORT can only multiply by an integer constant and produce an integer result. So you'll need to "scale" the numbers accordingly. I'm not sure exactly what you want for a result. For example:

123456789 * .0256 = 3160493

Do you want 003160493C (P'3160493') as the 5-byte result? Or do you want something else? If something else, what do you want exactly?
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jathampy
Member


Joined: 26 Sep 2009
Posts: 18
Location: software engineer

PostPosted: Thu Jul 29, 2010 4:33 am    Post subject: Reply with quote

Yes Frank. I want a 5 byte packed field result.
Back to top
View user's profile Send private message
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 510
Location: San Jose, CA

PostPosted: Thu Jul 29, 2010 9:35 pm    Post subject: Reply with quote

You can use this DFSORT OUTREC statement:

Code:

 OUTREC OVERLAY=(81:((54,5,PD,MUL,+256),DIV,+10000),
      TO=PD,LENGTH=5)

_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jathampy
Member


Joined: 26 Sep 2009
Posts: 18
Location: software engineer

PostPosted: Fri Jul 30, 2010 12:09 pm    Post subject: Reply with quote

Thanks Frank for the solution
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts IAM BEGINNER IN JCL ...PLZ HELP ME 3 Guest 13620 Wed Jul 07, 2010 8:20 am
anilsani285 View latest post
No new posts Hi plz help me out 5 Guest 5547 Wed Jul 07, 2010 8:18 am
anilsani285 View latest post
No new posts File-Aid Help 1 Nicholas 8854 Thu Apr 13, 2006 2:12 pm
rangab View latest post
No new posts Search Batch file-aid help 6 frenchman 9753 Tue Mar 28, 2006 5:30 pm
Guest View latest post
No new posts executing java program thru JCL 1 Guest 7989 Fri Mar 17, 2006 10:14 am
arrbee View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB