Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to pass date in header sort card?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to pass date in header sort card?
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 Moderator


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

PostPosted: Wed Jan 10, 2007 10:24 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Jan 11, 2007 9:49 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

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    Post subject: its not working....
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    Post subject:
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 Moderator


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

PostPosted: Wed Jan 17, 2007 10:13 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Jan 17, 2007 10:34 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Jan 18, 2007 1:57 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us