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

Date Constants in Jcl.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mane Sagar

New User


Joined: 12 Jul 2005
Posts: 41
Location: mumbai

PostPosted: Tue Mar 07, 2006 7:14 pm
Reply with quote

Hi,

I had read a document on regarding the DATE Constants we can use in Jcl.
I have tried the test jcl that was mentioned in it but it gave an error.
Can you please correct the error in it and give a brief explanation about this.

Jcl:
Code:

//STEP01   EXEC PGM=ICETOOL,                         
//            COND=(0,NE)                           
//*                                                 
//TOOLMSG   DD  SYSOUT=*                             
//*                                                 
//DFSMSG    DD  SYSOUT=*                             
//*                                                 
//SORTIN    DD  *                                   
//*                                                 
//SORT1     DD  DSN=ACMSTMP.DATE1.TEST1,             
//            DISP=(NEW,CATLG,DELETE),               
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),
//            DCB=(RECFM=FB,LRECL=231,BLKSIZE=2310) 
//*                                                 
//SORT2     DD  DSN=ACMSTMP.DATE1.TEST2,             
//            DISP=(NEW,CATLG,DELETE),               
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),
//            DCB=(RECFM=FB,LRECL=231,BLKSIZE=2310) 
//*                                                 
//SORT3     DD  DSN=ACMSTMP.DATE1.TEST3,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),
//            DCB=(RECFM=FB,LRECL=231,BLKSIZE=2310)
//*                                                 
//SORT4     DD  DSN=ACMSTMP.DATE1.TEST4,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),
//            DCB=(RECFM=FB,LRECL=231,BLKSIZE=2310)
//*                                                 
//SORT5     DD  DSN=ACMSTMP.DATE1.TEST5,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),
//            DCB=(RECFM=FB,LRECL=231,BLKSIZE=2310)
//*                                                 
//SORT6     DD  DSN=ACMSTMP.DATE1.TEST6,           
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE),
//            DCB=(RECFM=FB,LRECL=231,BLKSIZE=2310)
//*                                               
//TOOLIN    DD *  *** CONSTANT CONTROL CARDS ***   
  COPY FROM (SORTIN) USING (CTL1)                   
//CTL1CNTL  DD *  *** CONSTANT CONTROL CARDS ***   
  OUTFIL FNAMES=SORT1,                               
    OUTREC=(C'COST PRD MONTH:',C',',DATE1(-),206X)     
  OUTFIL FNAMES=SORT2,                               
    OUTREC=(C'COST PRD WEEK :',C',',TIME1(:),208X)     
  OUTFIL FNAMES=SORT3,                               
    OUTREC=(C'COST PRD TIME :',TIME=(12.),206X)       
  OUTFIL FNAMES=SORT4,                               
    OUTREC=(C'COST PRD DATE :',TIME1(:),209X)         
  OUTFIL FNAMES=SORT5,                               
    OUTREC=(C'COST PRD TIME2:',DATE=(DM4.),207X)       
  OUTFIL FNAMES=SORT6,                               
    OUTREC=(C'COST PRD DATE2:',DATE1,TIME1,203X)       
/*    END OF INPUT                                 
//*                                               
//SYSOUT       DD  SYSOUT=*
//                         


Error:

Code:

ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED                 
                                                             
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS:  TOOLIN             
                                                             
                                                             
ICE630I 0 MODE IN EFFECT:  STOP                               
                                                             
          COPY FROM (SORTIN) USING (CTL1)                     
                   $                                         
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER           
ICE602I 0 OPERATION RETURN CODE:  12                         
                                                         
                                                             
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE:  12
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Mar 07, 2006 7:23 pm
Reply with quote

Mane Sagar, when you post code, please enclose your code in CODE tags so that indents and formats are properly preserved. I edited your post and did that for you. I cannot tell if you added the proper indentation for the input parameters, so I also added them. Please go back and make sure that they are properly indented.
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: Tue Mar 07, 2006 9:33 pm
Reply with quote

The $ under the COPY operator shows you where the problem is. You have a blank between FROM and (SORTIN) that shouldn't be there. The COPY operator should look like this:

Code:

  COPY FROM(SORTIN) USING(CTL1)


Also, the LRECL values you're specifying for the SORTx DDs do NOT match the OUTREC record lengths. Remove the DCB info and let DFSORT set it automatically, e.g.

Code:

//SORT1     DD  DSN=ACMSTMP.DATE1.TEST1,             
//            DISP=(NEW,CATLG,DELETE),               
//            UNIT=SYSDA,SPACE=(CYL,(250,100),RLSE)
Back to top
View user's profile Send private message
Mane Sagar

New User


Joined: 12 Jul 2005
Posts: 41
Location: mumbai

PostPosted: Wed Mar 08, 2006 6:13 pm
Reply with quote

Hi Frank and Superk,

Thanks a lot for the corrections.
I will make this changes and try a test run again.

Thanks again.
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top