HOW TO SELECT SOME PORTION FROM A REPORT?

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

HOW TO SELECT SOME PORTION FROM A REPORT?

Post by anilanju » Mon Nov 10, 2008 7:23 pm

Hello all

I am a new member, and i am facing a problem.

I have a report which has ouput deatils of many programs, i need to pick
the data of some programs and copy it to some other PS file.

The format of the report is:
Heading and then the data.

So when i try to use sorting, it just gives me the heading.
What needs to be done so that i get the data also along with the report.

Thanks
Anubhuti

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Mon Nov 10, 2008 9:09 pm

You haven't given enough information for anyone to help you. You need to explain in more detail what you're trying to do. Show an example of the records in your input file and what you expect for output. Explain the "rules" for getting from input to output. Give the RECFM and LRECL of your input file. Give the starting position, length and format of each relevant field.

(I removed your other thread. There's no reason to have another thread for the same question. Just post additional information to this thread.)
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

User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

Post by anilanju » Mon Nov 10, 2008 9:24 pm

Hi Frank

i have mailed you my querry in detail, If you receive my mail
please notify me once.
Thanks
Anubhuti
id:anilanju

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Mon Nov 10, 2008 10:36 pm

Based on the information you sent me offline, here's a DFSORT job that will do what you asked for. I assumed your input file and output files have RECFM=FB and LRECL=80, but you can change the job appropriately for other attributes. The job uses DFSORT's new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008).

Code: Select all

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
1PROGRAM ID : TPMN300  FSADMFIST1                       ABC
  REPORT  ID : TPMN300.02                                 X
                                                  NJR COSTI
0 APPLICATION : NJR     SOURCE : AB     DATA TYPE : HOURS
0                              -----------INPUT------------
  CORP ID  FIST1               RECORDS                AMOUN
.
.
.
1PROGRAM ID : TPMN500  FSADMFIST1                       ABC
  REPORT  ID : TPMN300.02                                 X
                                                  NJR COSTI
0 APPLICATION : NJR     SOURCE : AB     DATA TYPE : HOURS
0                              -----------INPUT------------
 CORP ID  FIST1               RECORDS
.
.
.
0PROGRAM ID : TPMN400  FSADMFIST1
  REPORT ID : TPMN400.01
                               COMMON SUSPENSE
0 APPLICATION : NJR      SOURCE : AB     DATA TYP
0                                -----------INPUT
 CORP ID  FIST1                  RECORDS
-JOURNAL - NJ660X1131
 ACTUALS  DEBITS                  47,427
          CREDITS                 47,427
.
.
.
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(2,12,CH,EQ,C'PROGRAM ID : '),
     PUSH=(81:15,7))
  OUTFIL INCLUDE=(81,7,SS,EQ,C'TPMN300,TPMN400'),
    BUILD=(1,80)
/*
If you don't have z/OS DFSORT PTF UK90013, ask your System Programmer to install it (it's free).

For complete details on the new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/sof ... /mvs/ugpf/
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

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Tue Nov 11, 2008 11:49 am

It will be helpful to board member, if question details are provided here.
Natarajan
Chennai

User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

Post by anilanju » Tue Nov 11, 2008 12:01 pm

HI Frank

Thanks a lot, but it giving me syntex error and statement defining error again n again.

Please help.

My recold lenght is 133, and format is FBA

Thanks

Anu

User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

Post by anilanju » Tue Nov 11, 2008 12:23 pm

Hi
i am getting this syntex error:

Code: Select all

            INREC IFTHEN=(WHEN=GROUP,BEGIN=(2,13,CH,EQ,C'PROGRAM D : '),       
                               ?                                                
ICE007A 0 SYNTAX ERROR                                                          
                    PUSH=(134:2,7))                                             
                    ?                                                           
Regards:
Anu

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Tue Nov 11, 2008 8:30 pm

That syntax error indicates your shop doesn't have z/OS DFSORT V1R5 PTF UK90013 (July, 2008) installed. Ask your System Programmer to install it (it's free).
INREC IFTHEN=(WHEN=GROUP,BEGIN=(2,13,CH,EQ,C'PROGRAM D : '),
PUSH=(134:2,7))
Why are you checking for 'PROGRAM D :'? That doesn't correspond to the input you sent me. And why would you do the PUSH for 2,7 - that would put 'PROGRAM' in every record which wouldn't allow you to select particular groups. You want to push the value that identifies the groups. In my example, that's the TPMNxxx value. You need to use the correct value for your situation.
Last edited by Frank Yaeger on Tue Nov 11, 2008 8:40 pm, edited 1 time in total.
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

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Tue Nov 11, 2008 8:34 pm

It will be helpful to board member, if question details are provided here.
The OP has input records as shown in the job I posted. It has groups of records that have 'PROGRAM ID : TPMNxxx' starting in position 2. He wants to extract the groups of records for TPMN300 and TPMN500.
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

User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

Post by anilanju » Wed Nov 12, 2008 6:14 pm

Hi frank

I have written
INREC IFTHEN=(WHEN=GROUP,BEGIN=(2,13,CH,EQ,C'PROGRAM ID : '),
program id only, by mistake it changed to program D.
and i tried PUSH=(134:15,7))

but still d same syntex problem..

SYNTAX ERROR
PUSH=(134:15,7))
?


Regards
Anu

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Nov 12, 2008 9:18 pm

but still same syntex problem..


And still same reason:
That syntax error indicates your shop doesn't have z/OS DFSORT V1R5 PTF UK90013 (July, 2008) installed. Ask your System Programmer to install it (it's free).
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

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Jan 25, 2016 10:36 pm

<< Content deleted By Admin >>

Post Reply

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



Other References
Mainframe Tools and others