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
 

 

Is it possible to USE DIVIDE in DFSORT

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

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Tue Nov 06, 2007 8:57 pm    Post subject: Is it possible to USE DIVIDE in DFSORT
Reply with quote

Hi All,

Is it possible to USE DIVIDE in DFSORT by any number instead of predefined D,M,C etc.

Please let me know.

Thanks
Anish.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 06, 2007 10:12 pm    Post subject:
Reply with quote

You can use DIV (for divide) in BUILD or OVERLAY with DFSORT. For example:

Code:

   INREC BUILD=(11:11,8,ZD,DIV,+20,TO=ZD,LENGTH=8)


If you need more specific help, you'll need to supply more details about what you're trying to do.
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Tue Nov 06, 2007 10:30 pm    Post subject:
Reply with quote

Hi Frank,


Thx for the Info. I have

Code:


ABC:   4523223
A  :   2432300


I need A/ABC and reformatted in this way as below

Code:


ABC:   4523223
A  :   2432300
C  :   0.5377


Thanks
Anish.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Nov 06, 2007 10:52 pm    Post subject:
Reply with quote

anish.ibm

Hello anish, is that you have only 2 records in your i/p or more than that?
If so, show example as to how the i/p and o/p looks like?
i/p and o/p RECFM and LRECL?
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Tue Nov 06, 2007 11:06 pm    Post subject:
Reply with quote

Hi Kris,

I have some set of records. But i need only for one set of record . That will do... i will enhance the solution.


Thanks,
Anish.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 06, 2007 11:29 pm    Post subject:
Reply with quote

Quote:
I have some set of records. But i need only for one set of record . That will do... i will enhance the solution.


I would suggest a different solution for two records vs "some set of records". Please show an example that more closely matches what you're trying to do so I can offer a solution that will work for what you're actually doing.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 07, 2007 12:01 am    Post subject:
Reply with quote

Quote:
I have some set of records. But i need only for one set of record . That will do... i will enhance the solution.
We would like to provide the enhanced solution,So please provide ample amount of example records that describe the i/p and o/p
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Wed Nov 07, 2007 7:04 pm    Post subject:
Reply with quote

Hi Frank/Kris,

My requirement is below..


Input file

Code:

Header record
23323 21 1232212 (23323/1232212)*100  <-- Need the result of this expression here in this 5 Byte area
21122 35 2122212 (21122/2122212)*100   
..
..
Trailer record


Output file

Code:

Header record
23323 21 1232212 01.89
21122 35 2122212 00.99
..
..
Trailer record



Thanks,
Anish.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Nov 07, 2007 10:36 pm    Post subject:
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
Header record
23323 21 1232212
21122 35 2122212
Trailer record
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,6,CH,NE,C'Header',AND,
    1,7,CH,NE,C'Trailer'),
    OVERLAY=(18:(1,5,ZD,MUL,+10000),DIV,10,7,ZD,EDIT=(TT.TT)))
/*
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 How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts DFSORT to match two files and write John F Dutcher DFSORT/ICETOOL 6 Thu May 12, 2016 5:17 pm


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