MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Julian date in a report using ICETOOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Tue Apr 24, 2007 3:44 am    Post subject: Julian date in a report using ICETOOL Reply with quote

I have an input file in the format as below:
Code:

 ABC   1234
 DEF   1234
 GHI   1234
 JKL   1234

I want to generate a report in the format as below: 07114 is the Julian date ,when the job is run the julian date should be displayed in the report.
Code:

                                                           PAGE     :          1
                                                           RUN DATE :   04/24/07
                                                           RUN TIME :   01:06:31
                                                                               
                        SUMMARY REPORT                         

                                                                               
 CODES                                                                       
 -----
 07114ABC
 07114DEF
 07114GHI
 07114JKL

My job is like as below which is executing a COBOL DB2 Program and i am passing a parameter &DATE from the SCHEDULAR we use in our shop in which i will initialize Julian date say for example 07114 and i am using ICETOOL purposefully for generating a Report:
Code:

//ABCDPGM EXEC PGM=IKJEFT01
//..
/..
//SYSTSIN DD *                                                 
 DSN SYSTEM(DSNP)                                                       
 RUN PROGRAM(ABCDPGM) PLAN(ABCDPGM) PARM('&DATE')                     
 END                                                                   
/*                                                                     
//STEP010  EXEC PGM=IDCAMS                                             
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  DELETE PROJECT.TEST.OUT   SCRATCH PURGE       
  IF MAXCC = 8 THEN SET MAXCC = 0                                       
/*                                                                     
//STEP020  EXEC PGM=ICETOOL                 
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN       DD DSN=PROJECT.TEST.IN,DISP=SHR           
//TOOLIN   DD DSN=PROJECT.TEST.CARDS(A),DISP=SHR                         
//COPYCNTL DD DSN=PROJECT.TEST.CARDS(B),DISP=SHR                         
//OUT      DD DSN=PROJECT.TEST.OUT,             
//            DISP=(NEW,CATLG,DELETE),DCB=(LRECL=133,RECFM=FB),         
//            SPACE=(CYL,(1,1),RLSE),UNIT=SYSDA                         
//                                           

My cards are as below:
Code:

A
 COPY   FROM(IN)     TO(OUT)     USING(COPY)

B
 INREC FIELDS=(2:&DATE,2,3,124X)                                       
 OUTFIL FNAMES=OUT,REMOVECC,                                           
 HEADER1=(60:C'PAGE     :     ',PAGE,/,        * HEADER PAGE           
          60:C'RUN DATE :   ',DATE,/,          * HEADER DATE           
          60:C'RUN TIME :   ',TIME,/,          * HEADER TIME           
          1:133X,/,                                                     
          25:'SUMMARY REPORT',/,                       
          1:133X,/,                                                     
          2:C'CODES',/,                                               
          2:C'--------')                                   

The output i am getting is as below, can anybody help me out to get the desired format and i want using ICETOOL only.
Code:

                                                           PAGE     :          1
                                                           RUN DATE :   04/24/07
                                                           RUN TIME :   03:44:01
                                                                               
                        SUMMARY REPORT                         
                               
                                                                               
 CODES                                                                       
 -----                                                                       
 04/24/07ABC                                                                   
 04/24/07DEF                                                                   
 04/24/07GHI                                                                   
 04/24/07JKL                                                                   

Can we generate Julian date using some functions like Y'DATE3' Y'YYDDD' or make use of the SCHEDULAR variable for generating Julian date in the Report ?
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Apr 24, 2007 4:57 am    Post subject: Reply with quote

No symbolic, in this case &DATE, can be used to CHANGE data via the OS - you have to use a program that reads the substituted value in some way - either as a parm or by a dataset that is allocated on the basis of the value in the symbol. You will have to use DFSORTs date faciliies to get the date in the required format - in this case Julian (yyddd).
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Apr 24, 2007 5:23 am    Post subject: Reply with quote

yadav2005,

Use DATE(3) format (yyyyddd) and then strip off the first 2 bytes of the yyyy.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Tue Apr 24, 2007 7:01 am    Post subject: Reply with quote

Kolusu,

Thanks for your reply.Now i am able to able the get as below but how do i strip off the first 2 bytes.
Code:

                                                           PAGE     :          1
                                                           RUN DATE :   04/24/07
                                                           RUN TIME :   03:44:01
                                                                               
                        SUMMARY REPORT                         
                               
                                                                               
 CODES                                                                       
 -----                                                                       
 2007114ABC                                                                   
 2007114DEF                                                                   
 2007114GHI                                                                   
 2007114JKL                                                                   

And i changed my Control Card B as below:
Code:

 INREC FIELDS=(2:DATE3,2,3,124X)                                       
 OUTFIL FNAMES=OUT,REMOVECC,                                           
 HEADER1=(60:C'PAGE     :     ',PAGE,/,        * HEADER PAGE           
          60:C'RUN DATE :   ',DATE,/,          * HEADER DATE           
          60:C'RUN TIME :   ',TIME,/,          * HEADER TIME           
          1:133X,/,                                                     
          25:'SUMMARY REPORT',/,                       
          1:133X,/,                                                     
          2:C'CODES',/,                                               
          2:C'--------')     

How can i achieve the desired result as i am first formatting my input records ,then printing the headers and then copying the formatted input records to the output after the headers are printed.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Apr 24, 2007 9:13 am    Post subject: Reply with quote

yadav2005,

Just add this line after your inrec fields

Code:

OUTREC FIELDS=(2:4,132)


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Tue Apr 24, 2007 1:11 pm    Post subject: Reply with quote

Thanks Kolusu,

You are such a wonderful person and i have got my desired result and thanks once again for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group