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


Sort report writer queries

 
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: Mon Mar 29, 2010 11:24 pm    Post subject: Sort report writer queries Reply with quote

I have the following questions relate to Sort reports

Q1
I am using the following SORT to create a report. However the date is displayed as 29-03-2010 in the report. Instead my requirement is to display the date as 29-MAR-2010 in the report. Is there any date format that displays the month name ?.

SORT FIELDS=COPY
OUTFIL HEADER1=(52:'BDCN999A - PRODUCT CODE 114138'),
HEADER2=(1:DATE=(DM4-),
51:'PRODUCED BY BRANCH SYSTEMS - MIS',
110:'PAGE ',PAGE,/,
1:'----------------------------------------',
41:'----------------------------------------',
81:'---------------------------------------',
120:'-------------',/,
1:'BRANCH',
17:'TILL',
31:'RECEIPT',
49:'PRODUCT',
67:'PLANNING',
86:'EMP',
110:'QTY',
126:'PRICE',/,
67:'GROUP',
86:'NO',/,
1:'----------------------------------------',
41:'----------------------------------------',
81:'---------------------------------------',
120:'-------------'),
TRAILER1(1:'END OF REPORT'),
OUTREC=(1:1,4,17:5,2,31:7,4,49:11,6,67:17,4,
86:21,10,110:31,3,PD,M0,LENGTH=4,
126:34,4,PD,EDIT=(IIT.TTS),SIGNS=(,,,-))

Q2 I tried the above jcl using ICETOOL display operator and I couldn't find any Edit pattern similar to EDIT=(IIT.TTS). I would like to know the edit pattern or pre-defined edit masks similar to EDIT=(IIT.TTS) which can be used in display operator.
Back to top
View user's profile Send private message

Frank Yaeger
Moderator


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

PostPosted: Tue Mar 30, 2010 4:08 am    Post subject: Reply with quote

Q1. With INREC, you can use DATE=(DM4-) to put the dd-mm-yyyy date at the end of the record and convert the mm to 'mon' with CHANGE. Then you can use the resulting constant in your header. If you want me to show you how to do this, tell me the RECFM and LRECL of your input file.

Q2. Not sure I understand your question here. Are you looking for an Mn edit mask equivalent to EDIT=(IIT.TTS),SIGNS=(,,,-)? If so, why? You can just use EDIT=(IIT.TTS),SIGNS=(,,,-).
_________________
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: Tue Mar 30, 2010 5:19 am    Post subject: Reply with quote

Thanks Frank for your Quick Response.

Q1: The input file record format is FB and the LRECL is 110.It would be great if you can show me how to pass the date constant to Header2.

Q2.Initially I was trying my requirement using DISPLAY operator of ICETOOL instead of SORT report writer. However I was not able to find out the equivalent edit pattern EDIT=(IIT.TTS) used in ON field of DISPLAY operator. I tried using
HEADER('PRICE') ON(34,4,PD,E'999.99S') and HEADER('PRICE') ON(34,4,PD,C6)
and both are not giving the expected results similar to EDIT=(IIT.TTS). Hence I would like to know the edit pattern similar to EDIT(IIT.TTS) that can be used in ON field of DISPLAY operator.
Back to top
View user's profile Send private message
skolusu
Member


Joined: 26 Jul 2008
Posts: 37

PostPosted: Tue Mar 30, 2010 9:24 pm    Post subject: Reply with quote

jathampy,

Here is a job which would convert the date into a month name and write it on the header2

Code:

//SYSIN    DD *                                               
  SORT FIELDS=COPY                                           
  OUTREC OVERLAY=(132:DATE1,                                 
                  136,2,CHANGE=(3,C'01',C'JAN',C'02',C'FEB', 
                                  C'03',C'MAR',C'04',C'APR', 
                                  C'05',C'MAY',C'06',C'JUN', 
                                  C'07',C'JUL',C'08',C'AUG', 
                                  C'09',C'SEP',C'10',C'OCT', 
                                  C'11',C'NOV',C'12',C'DEC'))
  OUTFIL REMOVECC,                                           
  OUTREC=(1:1,4,17:5,2,31:7,4,49:11,6,67:17,4,               
          86:21,10,110:31,3,PD,M0,LENGTH=4,                   
         126:34,4,PD,EDIT=(IIT.TTS),SIGNS=(,,,-)),           
  HEADER1=(52:'BDCN999A - PRODUCT CODE 114138'),             
  HEADER2=(01:138,2,'-',140,3,'-',132,4,                     
           51:'PRODUCED BY BRANCH SYSTEMS - MIS',             
           110:'PAGE ',PAGE,/,                               
           01:131'-',/,                                       
           01:'BRANCH',                                       
           17:'TILL',                                         
           31:'RECEIPT',                                     
           49:'PRODUCT',                                     
           67:'PLANNING',                                     
           86:'EMP',                                         
          110:'QTY',                                         
          126:'PRICE',/,                                     
           67:'GROUP',                                       
           86:'NO',/,                                         
           01:131'-'),                                       
  TRAILER1(1:'END OF REPORT')                                 
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message
Frank Yaeger
Moderator


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

PostPosted: Tue Mar 30, 2010 9:46 pm    Post subject: Reply with quote

Quote:
I would like to know the edit pattern similar to EDIT(IIT.TTS) that can be used in ON field of DISPLAY operator.


Oh, now I understand what you want. Unfortunately, DISPLAY does NOT have an equivalent for that edit pattern so you're better off using OUTFIL.
_________________
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: Tue Mar 30, 2010 10:35 pm    Post subject: Reply with quote

Thanks Frank and Kolusu for your help.
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 United Health group Interview ? 2 need@help 3229 Thu Aug 05, 2010 11:30 am
Natarajan View latest post
No new posts Sort file by groups, keeping only the last group 7 TamiAZ 1288 Fri Oct 02, 2009 11:24 am
TamiAZ View latest post
No new posts What do you accomplish by GROUP BY ... HAVING clause? 1 Krishna 1283 Sun Mar 29, 2009 10:13 pm
Krishna View latest post
No new posts can i write a elementary item to group item. 1 mainframe5 1552 Tue Jun 17, 2008 1:47 pm
dbzTHEdinosauer View latest post
No new posts Why is Group move better than INITIALIZE verb? 1 NiceGuy 2421 Mon Nov 19, 2007 6:52 am
DavidatK 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