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
 

 

Issue in O/P Formatting

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

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Wed Feb 18, 2009 6:00 pm    Post subject: Issue in O/P Formatting
Reply with quote

Hi,

I am facing an issue with the below sort. DIFFERENCE Amount is not populating correctly.

I/P file has LRECL of 209.

Below is the I/P file LAYOUT

01 TOT-LINES
10 FILLER PIC X(21) VALUE SPACES.
10 TYPE PIC X(11) VALUE SPACES.
10 DR-AMT PIC Z,ZZZ,ZZZ,ZZZ,ZZZ.99
10 FILLER PIC X(01) VALUE SPACES.
10 CR-AMT PIC Z,ZZZ,ZZZ,ZZZ,ZZZ.99
10 FILLER PIC X(01) VALUE SPACES.
10 TOT-AMT PIC Z,ZZZ,ZZZ,ZZZ,ZZZ.99
10 FILLER PIC X(02) VALUE SPACES.
10 DBCR PIC X(02) VALUE SPACES.
10 FILLER PIC X(97) VALUE SPACES.
10 ID PIC X(10) VALUE SPACES.
10 NUMBER PIC X(04) VALUE SPACES.

My O/P report should look like

1PROGRAM : TESTPGM
CASE : SUMRY
NUM : REPORT RUN - INFO NOT SENT

ID NO DR AMT CR AMT DIFF STAT EN STAT

AAAAAAAAA 1111 100.00 200.00 50.00CR NO BAL CREATE
BBBBBBBBB 2222 200.00 200.00 20.00DR NO BAL CREATE
------------ ---------- ---------
GRAND TOTAL 300.00 400.00 30.00DR
======= ===== =====


TEST REPORT
ABCDEF COMPANY SERVICES
***** END OF REPORT *****

Below is my sort card

SORT FIELDS=(02,10,CH,A,22,04,CH,A)
OUTFIL HEADER2=(001:'PROGRAM : TESTPGM',
083:'ABCDEF COMPANY SERVICES',
001:'NUM : REPORT RUN - INFO NOT SENT',//,
001:'ID',
021:'NO',
040:'DR AMT',
060:'CR AMT',
081:'DIFF',
099:'STAT',
114:'EN STAT',/),
SECTIONS=(196,10,
TRAILER3=(/,33:'---------------------',
54:'---------------------',
75:'---------------------',
/,21:GRAND TOTAL',
33:TOT=(33,20,UFF,M2,LENGTH=20),
54:TOT=(54,20,UFF,M2,LENGTH=20),
75:TOT=(75,20,UFF,M2,LENGTH=20), /,33:'============',
54:'============',
75:'============')),
TRAILER2=(53:'TEST REPORT',/,
50:'ABCDEF COMPANY SERVICES',/,
50:'***** END OF REPORT *****',/),
OUTREC=(01,02,10,
11:10C' ',
21:22,04,
25:07C' ',
32:33,20,
52:C' ',
53:54,20,
73:C' ',
74:75,20,
94:C' ',
95:96,2
97:2C' ',
99:100,14,
113:C' ',
114:115,19,
133:76C' ')



with this sort I am getting the value as 70.00 under DIFF column.

I need to have the value as 30.00DR under DIFF column in the O/P report.

Can you please help me in correcting this sort card icon_smile.gif

Please let me know if you need any other information.

O/P LRECL is 209.

Regards,
Chinni.
Back to top
View user's profile Send private message

chinnielr

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Wed Feb 18, 2009 6:20 pm    Post subject: Reply to: Issue in O/P Formatting
Reply with quote

Hi,

Forgot to mention, the RECFM is FBA for both O/P as well in I/P.

Regards,
Chinni.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Feb 19, 2009 1:43 am    Post subject:
Reply with quote

chinnielr,

Use the following Control cards


Code:
 
//SYSIN    DD *                                                   
  SORT FIELDS=(02,10,CH,A,22,04,CH,A)                             
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(211:75,20)),                 
  IFTHEN=(WHEN=(95,2,CH,EQ,C'CR'),OVERLAY=(210:C'+')),           
  IFTHEN=(WHEN=(95,2,CH,EQ,C'DR'),OVERLAY=(210:C'-'))             
                                                                 
  OUTFIL REMOVECC,                                               
  BUILD=(001:02,10,                                               
         021:22,04,                                               
         032:33,20,                                               
         053:54,20,                                               
         074:75,20,                                               
         095:95,2,                                               
         099:100,14,                                             
         114:115,19,                                             
         209:X),                                                 
  HEADER2=(001:'PROGRAM : TESTPGM',                               
           083:'ABCDEF COMPANY SERVICES',/,                       
           001:'NUM : REPORT RUN - INFO NOT SENT',//,             
           001:'ID',                                             
           021:'NO',                                             
           046:'DR AMT',                                         
           066:'CR AMT',                                         
           087:'DIFF',                                           
           099:'STAT',                                           
           114:'EN STAT',/),                                     
  TRAILER2=(53:'TEST REPORT',/,                                   
            50:'ABCDEF COMPANY SERVICES',/,                       
            50:'***** END OF REPORT *****',/),                   
  SECTIONS=(196,10,                                             
  TRAILER3=(/,33:20'-',                                         
              54:20'-',                                         
              75:20'-',/,                                       
              21:'GRAND TOTAL',                                 
              33:TOT=(33,20,UFF,M2,LENGTH=20),                 
              54:TOT=(54,20,UFF,M2,LENGTH=20),                 
              74:TOT=(210,21,SFF,EDIT=(I,III,III,III,IIT.TTS), 
                 SIGNS=(,,C,D)),'R',/,                         
              33:20'=',                                         
              54:20'=',                                         
              75:20'='))                                       
/* 
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 Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts REXX Screen not working due to LINKED... sundarkudos CLIST & REXX 1 Mon May 09, 2016 1:44 pm


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