IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to pass date in header sort card?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
eti.jain
Currently Banned

New User


Joined: 28 Jun 2006
Posts: 7

PostPosted: Wed Jan 10, 2007 10:00 pm
Reply with quote

Hello friends,

i have one query.

i have to change a report which prints data of 3 months.its header is define in a sort card using OUTFIL - HEADER2 field.

currently i have report in this format.

denial report - Medicare page no
non contracted providers

data1 data 2 data3

now i have to change this to:

denial report - Medicare page no
non contracted providers
jan 06 - mar 06


data1 data 2 data3

how can we get this time peroid in header..as this time period will vary for each report...suppose if current month report is of jan 2006 then..we have to print time peroid ... nov 05- jan 06..in this way...

how can we get this through header sort card?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 10, 2007 10:24 pm
Reply with quote

It's not clear what you want for the time period. At first I thought you wanted to use the current month to get the time period. For example, if the report was run today, the current month would be Jan, 2007 and the heading would have nov 06- jan 07. But you show nov 05- jan 06, so where did the "current" month of jan 06 come from? Do you actually want to use the current month of the run, or do you want some other month and if so where do you get that month from?
Back to top
View user's profile Send private message
eti.jain
Currently Banned

New User


Joined: 28 Jun 2006
Posts: 7

PostPosted: Thu Jan 11, 2007 11:52 am
Reply with quote

Hi frank..

yes u r right ..tht was by mistake..if i am running the current month report the header shud be of nov 06 - jan 07.....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jan 11, 2007 9:49 pm
Reply with quote

You can create that heading line as a DFSORT symbol and then use the symbol in HEADER2. Here's a DFSORT job that shows how. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's DATE2-2 function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(DATE2-2,DATE2)
  OUTREC BUILD=(C'months,''',
   5,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'),
   X,3,2,C' - ',
   11,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'),
   X,9,2,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL HEADER2=('denial report - Medicare page no',/,
    'non contracted providers',/,
    months)
/*
Back to top
View user's profile Send private message
eti.jain
Currently Banned

New User


Joined: 28 Jun 2006
Posts: 7

PostPosted: Wed Jan 17, 2007 12:23 pm
Reply with quote

hello ..

We are using DFSort which is of 2005 ...so we are unable to acheive this..can we implement this funtionality with prog...

we want this date on every page along with header ...like jan 06 - mar 06 should be printed on every page...plz help...
Back to top
View user's profile Send private message
eti.jain
Currently Banned

New User


Joined: 28 Jun 2006
Posts: 7

PostPosted: Wed Jan 17, 2007 3:46 pm
Reply with quote

Hello,

We have 3 files :

1st file we have - only single record that is : jan 06-mar06

2nd file we have a 2 line record that is:

denial report - Medicare page no
non contracted providers

we want to merge these 2 files in this format:

denial report - Medicare page no
non contracted providers
jan 06-mar06

how can we do this? can we do this using merge utility?


after that we have a file in which there are thousands of record and we want this merged header will come after every 52 lines in data.can we append this 3 lines header in the 3rd file which contains records like this:


data1 data2 data3 data4 data5 data6...
....
...

...



and we want combined file to look like this:


denial report - Medicare page no
non contracted providers
jan 06-mar06

data1 data2 data3 data4 data5 data6...
....
...

...

after 51 lines of data

denial report - Medicare page no
non contracted providers
jan 06-mar06

data1 data2 data3 data4 data5 data6...
....
...

...

after 51 line of data

denial report - Medicare page no
non contracted providers
jan 06-mar06

data1 data2 data3 data4 data5 data6...
....
...

...


how can we do all this without using programming...can we also do this using merge utility?

plz ignore previous query...i want answer to this one quickly...plzzz help....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 17, 2007 10:13 pm
Reply with quote

Here's a DFSORT job that will do what you asked for. I wasn't sure if you wanted "page no" in the first line of the header to be replaced with the actual page number of the report (e.g. 1, 2, ...) so I assumed you didn't. If you do, tell me what form you want the page no in (e.g. 0001) and I'll show you how to do that. I also assumed that file1 and file2 have RECFM=FB and the same LRECL.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file2
//       DD DSN=...  input file1
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTREC FIELDS=(C'Line',SEQNUM,1,ZD,C',''',1,35,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file3
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL LINES=55,HEADER2=(Line1,/,Line2,/,Line3,/)
/*
Back to top
View user's profile Send private message
eti.jain
Currently Banned

New User


Joined: 28 Jun 2006
Posts: 7

PostPosted: Wed Jan 17, 2007 10:30 pm
Reply with quote

hi Frank,

thanks for your reply.yaa i also want page number in page:1, page :2 format in the report.

report would be look like this:


denial report - Medicare page no page:1
non contracted providers
Jan'06 - Mar'06

data1 data2 data3 data4 data5 data6...
....
...

...

denial report - Medicare page no page:2
non contracted providers
Jan'06 - Mar'06

data1 data2 data3 data4 data5 data6...
....
...

...


Can you please explain wht this is exactly doing as i dont knw icetool..
plzz help...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 17, 2007 10:34 pm
Reply with quote

Then change the OUTFIL statement to something like:

Code:

  OUTFIL LINES=55,                                   
    HEADER2=(Line1,64:'page: ',PAGE=(M10,LENGTH=2),/,
      Line2,/,Line3,/)                               


Quote:
Can you please explain wht this is exactly doing as i dont knw icetool..


I'm not using ICETOOL - I'm using two DFSORT steps. Step S1 uses the records in your file2 and file1 to create DFSORT symbols as follows:

Code:

Line1,'denial report - Medicare page no   ' 
Line2,'non contracted providers           ' 
Line3,'jan 06-mar06                       ' 


Step S2 uses the Line1, Line2 and Line3 symbols in HEADER2 to create the header records.
Back to top
View user's profile Send private message
eti.jain
Currently Banned

New User


Joined: 28 Jun 2006
Posts: 7

PostPosted: Wed Jan 17, 2007 10:41 pm
Reply with quote

hi frank..

one more query...

i want to replace one outfil header varible with one file record...


SUPPOSE HEADER like...

OUTFIL FNAMES = SORTOUT

HEADER 2 ( 2: DATA1
16: denial report
56: NON CONTRACTED
62: DATE

)

I WANT THIS DATE VARIBLE WILL BE REPLACED BY A FILE RECORD IN WHICH A SINGLE RECORD IS WRITTEN LIKE THIS:


FILE CONTAINS:

JAN'06 - MAR'06


SO I WANT WHEN JOB RUNS THIS DATE VARIBLE WILL BE REPLACED BY THIS FILE RECORD.

HOW CAN I WRITE - OUTREC STATEMENT .?

PLZZ HELP...
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jan 18, 2007 1:57 am
Reply with quote

That's just another variation of what I already showed you how to do. Use the one record file to set up a symbol as shown previously, e.g. Mydate, and then use that Symbol for the date:

62:Mydate)

In my previous example, Line3 was set up for that constant.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top