MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reformatting a report using ICETOOL/SORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sri50131
Beginner


Joined: 07 Oct 2004
Posts: 38
Topics: 15

PostPosted: Tue Oct 03, 2006 3:27 pm    Post subject: Reformatting a report using ICETOOL/SORT Reply with quote

Hi,

I have an excel report that I have ftp'd to the mainframe. I need to know if it is possible to expand a column on the mainframe. Here is a snapshot the report:
Code:

                                                                       
                           METRO MARKET ACTIVITY                       
                                 REGION 71                             
                                                                       
 METRO MARKET: MINNEAPOLIS, MINNESOTA - SUBURBAN                       
 TERRITORY:  02                                                       
 COUNTIES:                                                             
                                                     
    YTD PERIOD                  # OF          YTD               %    LOSS       %
     THROUGH:                   AGCY         DWP             INC  RATIO     COMM
______________                ____      __________    ____    _____   ____
                                                           
DECEMBER 2004                  54          34,370,101     4        35           21
                                                       
DECEMBER 2005                  55          35,868,651     4        53           24

                                                                       
                           METRO MARKET ACTIVITY                       
                                 REGION 71                             
                                                                       
 METRO MARKET: MINNEAPOLIS, MINNESOTA - SUBURBAN                       
 TERRITORY:  04                                                       
 COUNTIES:                                                             

   
   YTD PERIOD       # OF       YTD      %    LOSS   %
     THROUGH:        AGCY       DWP     INC  RATIO COMM
______________   ____   __________  ____ _____ ____
                                                       
DECEMBER 2004          54   18,370,101     4    35   21
                                                       
DECEMBER 2005          55   19,868,651     4    53   24

Note: AGENCY COUNTS ARE BASED ON THE NUMBER OF AGENCY CODE NUMBERS ISSUE WITHIN THE METRO MARKET AREA. INCLUDES AIDCO.

I need to expand YTD DWP column by 4 and compress YTD PERIOD THROUGH: by 4 bytes. I know I can do using a COBOL program, but want to know if it is possible using SORT or ICETOOL.

Thanks
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Oct 03, 2006 5:05 pm    Post subject: Reply with quote

You can use DFSORT IFTHEN clauses to pick out the rows you want and expand or compress them however you like. I can't show you the exact job because you haven't shown what you want the output report to look like and I can't figure out what positions your data is actually in.

But the idea would be something like:

Code:

  OPTION COPY
  INREC IFTHEN=(WHEN=(5,10,CH,EQ,C'YTD PERIOD'),
     BUILD=(1:C'YTD PERIOD',...)),
  ...


You would use WHEN=(logexp) to identify each record type you want to change and BUILD to change it the way you want it.

For complete details on DFSORT's IFTHEN function, see:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sri50131
Beginner


Joined: 07 Oct 2004
Posts: 38
Topics: 15

PostPosted: Wed Oct 04, 2006 8:39 am    Post subject: Reply with quote

Frank, I am getting a JCL Error when executing the following:
The JCL error is:
Code:

SYT002I  "TOOLIN" INTERFACE BEING USED                     
                                                           
           OPTION COPY                                     
SYT048E  STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR   

The JCL is
//JSTEP010 EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//SYSOUT   DD  SYSOUT=*                                               
//IN       DD  DSN=ATEST.PSR012.METMKT.YTD.FILE2,                     
//           DISP=SHR                                                 
//OUT      DD  DSN=ATEST.PSR012.METMKT.YTD.FILE.REFMT,               
//           UNIT=SYSDA,DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(1,1),RLSE)
//TOOLIN  DD  *                                                       
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=(9,26,CH,EQ,C'DECEMBER 2004    ')               
       BUILD=(9:C'DECEMBER 2004')),                                   

Frank, I have a question:
If I change the starting position of the column heading, would the starting position of the column data also change?

Thanks
Sri
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Oct 04, 2006 10:18 am    Post subject: Reply with quote

The SYT message indicates you're using Syncsort, not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sri50131
Beginner


Joined: 07 Oct 2004
Posts: 38
Topics: 15

PostPosted: Wed Oct 04, 2006 10:33 am    Post subject: Reply with quote

Thanks Frank, our's is a SYNCSORT shop and not DFSORT.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> 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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group