Page 1 of 1

HOW TO SELECT SOME PORTION FROM A REPORT?

Posted: Mon Nov 10, 2008 7:23 pm
by anilanju
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

Posted: Mon Nov 10, 2008 9:09 pm
by Frank Yaeger
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.)

Posted: Mon Nov 10, 2008 9:24 pm
by anilanju
Hi Frank

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

Posted: Mon Nov 10, 2008 10:36 pm
by Frank Yaeger
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/

Posted: Tue Nov 11, 2008 11:49 am
by Natarajan
It will be helpful to board member, if question details are provided here.

Posted: Tue Nov 11, 2008 12:01 pm
by anilanju
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

Posted: Tue Nov 11, 2008 12:23 pm
by anilanju
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

Posted: Tue Nov 11, 2008 8:30 pm
by Frank Yaeger
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.

Posted: Tue Nov 11, 2008 8:34 pm
by Frank Yaeger
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.

Posted: Wed Nov 12, 2008 6:14 pm
by anilanju
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

Posted: Wed Nov 12, 2008 9:18 pm
by Frank Yaeger
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).

Topic deleted by Admin

Posted: Mon Jan 25, 2016 10:36 pm
by academyindia4
<< Content deleted By Admin >>