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.
Sort jcl - report writer queries using OUTREC
Moderators: Frank Yaeger, Moderator Group
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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=(,,,-).
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
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.
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.
jathampy,
Here is a job which would convert the date into a month name and write it on the header2
Here is a job which would convert the date into a month name and write it on the header2
Code: Select all
//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')
//*
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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.I would like to know the edit pattern similar to EDIT(IIT.TTS) that can be used in ON field of DISPLAY operator.
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page