Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Report creation in DFSORT

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

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Nov 25, 2008 12:50 am    Post subject: Report creation in DFSORT
Reply with quote

Hi,

I need to create a report ( of length 80 bytes ) which has the header as shown below

EFTS ISSUE REPORT
FOR CREDITOR INS POLICY
AS OF <Deposit Date>

The report should have following columns

ACCOUNT NUMBER CONTROL NUMBER DEPOSIT AMOUNT
12345678 xxxxxx-xx $10.00
23456789 xxxxxx-xx $20.00
TOTAL: $30.00

Input file details:
My input file has two records like this

ACCOUNT NUMBER
12345678
CONTROL NUMBER
xxxxxx-xx
DEPOSIT AMOUNT
10 ( THIS IS A COMP3 FEILD )
DEPOSIT DT
10/10/2008

Can some one pls advise ?? No ICETOOL pls. We are not allowed to move ICETOOL to production.

Thanks
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 25, 2008 2:15 am    Post subject:
Reply with quote

Quote:
My input file has two records like this


It's difficult to figure out the layout of your input fields the way you've shown them. Please give the starting position, length and format of each of the ACCOUNT NUMBER, CONTROL NUMBER and DEPOSIT AMOUNT input fields.

Also, give the starting position and length of each value in the report. Is $10.00 supposed to be left justified or right justified under the heading? Is the value always $xx.xx or can it be $xxx.xx or $x.xx as well. Do a better job of explaining what that field should look like in the report for different length values if allowed.

In the future, please use ubb code tags where appropriate.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Nov 25, 2008 2:24 am    Post subject: Reply to: Report creation in DFSORT
Reply with quote

Hi,

Sorry for inconvenience.
Here is the required information

ACCOUNT NUMBER - starts from position 1
CONTROL NUMBER - starts from position 10
DEPOSIT DT - starts from position 19
DEPOSIT AMOUNT - starts from position 29

Rest all is filler. The lay out of input file is FB, 80 Bytes.Output file has the same attributes as input.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Nov 25, 2008 2:27 am    Post subject:
Reply with quote

DEPOSIT AMOUNT is a COMP3 feild of length S9(7 ) comp-3.
ACCOUNT NUMBER is PIC X(9)
CONTROL NUMBER is PIC X(9)
DEPOSIT DT is PIC X(10)


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

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Nov 25, 2008 2:33 am    Post subject:
Reply with quote

Also, all the output feilds start under the headings. The $10.00 can be $XXXX.XX . if the value is 10, then it should look like $10.00, if it is 130, then it should look like $130.00. This feild has to be left justified.

thanks
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 25, 2008 2:42 am    Post subject:
Reply with quote

Hello,

If this is really a report, i suggest the aligning the decimal point will make the output much more readable (rather than left-justified). . .
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 25, 2008 3:18 am    Post subject:
Reply with quote

ap,

You can use a DFSORT job like the following to do what you asked for. I agree with Dick that left justifying the amount field makes no sense, so I right justified it.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL HEADER1=(46:'EFTS ISSUE REPORT',/,
   40:'FOR CREDITOR INS POLICY',/,
   47:'AS OF ',19,10,/),
  HEADER2=('ACCOUNT NUMBER',24:'CONTROL NUMBER',
   45:'DEPOSIT AMOUNT'),
  BUILD=(1,9,24:10,9,51:29,4,PD,EDIT=($IIIT.TT),80:X),
  TRAILER1=(44:'TOTAL: ',TOT=(29,4,PD,EDIT=($IIIT.TT)))
/*


For your input example, SORTOUT would have:

Code:

                                             EFTS ISSUE REPORT           
                                       FOR CREDITOR INS POLICY           
                                              AS OF 10/10/2008           
                                                                         
ACCOUNT NUMBER         CONTROL NUMBER       DEPOSIT AMOUNT               
12345678               xxxxxx-xx                    $10.00               
23456789               xxxxxx-xx                    $20.00               
                                           TOTAL:   $30.00               


If that isn't quite what you want, you can play around with the control statements.
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 Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us