2) Using syncsort can we capture date and time and display it in the report header as shown above using syncsort?
3) Can we get the month from the system directly thru sort?
4) Based on the value of a field in each record, can we have a string or
value written in the report. (M - MALE, F - FEMALE in the above report) while processing each detail record?
5) How to verify if there are detail recs in i/p file so as to write the report accordingly (NO DATA report if nor detail rec found)
6) The example is a simple representation of the input data. in reality it would be a file with a huge number of records.
For better performance, is it better to do this using Syncsort or should we code a cobol pgm or use FOCUS to do the report ?
7) Last but not least if there is already a post on this please let me know the link as I was unable to find. Sorry for the inconvenience if any.
Also if u have the link to the latest syncsort manual please pass that too.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed May 10, 2006 10:05 am Post subject:
Quote:
4) Based on the value of a field in each record, can we have a string or
value written in the report. (M - MALE, F - FEMALE in the above report) while processing each detail record?
Simple use a CHANGE parm to have the desired values.
Quote:
5) How to verify if there are detail recs in i/p file so as to write the report accordingly (NO DATA report if nor detail rec found)
Check this link which explains in detail about empty file checking
Thanks a lot Kolusu. It definitely helped.
Also I did check ur earlier posts on empty file handling and have made use of the logic.
I have one question though, just to handle a different situation.
When the input file has a header rec, then detail recs and then a trailer record,
how do we generate a regular report or a 'no data' report in the same step based on the presence or absence of the details records.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu May 11, 2006 4:26 am Post subject:
Quote:
I have one question though, just to handle a different situation.
When the input file has a header rec, then detail recs and then a trailer record,
how do we generate a regular report or a 'no data' report in the same step based on the presence or absence of the details records.
gsat,
Is there a way that you can identify the header and trailer records? If so then use OMIT cond to eliminate those records and then check for empty file.
thanks kolusu. I did that. but have got into another problem.
I used an IDCAMS step to check if the i/p file had just header and trailer rec only and based on the return code I was trying to use the appropriate sortin card for creating the report. but it was not working.
//STEP1 EXEC PGM=IDCAMS to check for empty file..
.
.
.
//CHEKPT IF STEP1.RC=00 THEN
// SET CNTLCRD='CNTL1'
// ELSE
// SET CNTLCRD='CNTL2'
// ENDIF
//*
//STEP2 EXEC PGM=SORT
//SORTIN.....
//SORTOUT....
//SYSOUT....
//SYSIN DD DSN=MY.PDS(&CNTLCRD),DISP=SHR
This way i was trying to create a report with data or no data based on the presence of detail recs in i/p file.
But what happened was the ELSE condition was not at all getting executed.
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