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 

EZACFSM1 utility
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
radkrish82
Beginner


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Tue Feb 01, 2011 1:12 pm    Post subject: EZACFSM1 utility Reply with quote

1.Can anyone please let me know if I want to have the month name.
I mean my reqmt is to have JAN,FEB,MAR to DEC rather than having 01 to 12 by coding &MON.
2.If the Job A started running on 31st Jan 11:50PM (TSO time/mainframe server time) and ended at 1st Feb 12:02 AM, I would like to have date as 31 and month as Jan and not FEB populated in the file name.
3.if the Job A that is scheduled to run by everyday evening 11.50PM and because of previous jobs in late queue, JOB A is delayed to start running by 12.10AM the next day, the file name should be the scheduled run date date and month. I am using OPC scheduler. My shop expert is not aware about this.

Please help me in this scenario. I tried in google and other searches... iam yet to find a solution.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Feb 02, 2011 12:12 am    Post subject: Reply with quote

These are the standard Dynamic System Symbols:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2

I don't see any that exist for the month name. You'll have to use some other program for that value.

I'm not familiar enough with OPC to even venture a guess. Maybe you could look at defining all of the necessary variables way ahead of time at the start of your daily batch cycles, and just base them on the current time-of-day clock.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 02, 2011 11:25 am    Post subject: Reply with quote

radkrish82,

Add the following as the first step in your JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD *                                                     
A                                                                   
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                 
  INREC IFTHEN=(WHEN=INIT,BUILD=(DATE1(-),80:X)),                   
  IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=6,ENDPOS=7,                   
   INOUT=(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')))   
/*


The output from this step is
Code:

2011-FEB-02

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

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


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Wed Feb 02, 2011 1:20 pm    Post subject: Reply with quote

Thanks, Kolusu for the first one. Thanks superk.

Additional details :
My actual reqmt is to have ftp control card like below :
Code:
MKDIR wwm\fgr\2011\feb\01\file\filename.

2011\feb\01\ will be changing on every run. 2011 is fitted by&YR4 and date with &day.
But the problem I cited in point 2 and 3 is pretty complex. Always job runs delay.
i.e 31st Jan file generates on 1st Feb.
I have to refer 31st Jan file but as per symbolics, it denotes 1st FEB. Close to subtracting 1 from date. (even it is Mar 1 st or Feb 1st) Iam not sure whether I can subtract date from symbolic itself. And FINDREP will not be a perfect choice. if i take care of date I miss month manipulation in case 1feb and 31st jan. Can anyone update me your viewpoint.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 02, 2011 1:39 pm    Post subject: Reply with quote

radkrish82 wrote:
My actual reqmt is to have ftp control card like below :
Code:
MKDIR wwm\fgr\2011\feb\01\file\filename.

2011\feb\01\ will be changing on every run. 2011 is fitted by&YR4 and date with &day.
But the problem I cited in point 2 and 3 is pretty complex. Always job runs delay.
i.e 31st Jan file generates on 1st Feb.
I have to refer 31st Jan file but as per symbolics, it denotes 1st FEB. Close to subtracting 1 from date. (even it is Mar 1 st or Feb 1st) Iam not sure whether I can subtract date from symbolic itself. And FINDREP will not be a perfect choice. if i take care of date I miss month manipulation in case 1feb and 31st jan. Can anyone update me your viewpoint.



If I understand correctly, your job runs daily at 11:50 pm and sometimes it gets delayed and may run the next day. You can also validate the time of job running and adjust the month name accordingly. You can give a buffer upto 10 AM on the following day and it would still have yesterday's date.

If the job runs between 00.00.00 (midnight) - 10:00:00 AM (morning 10 am) then the job will have current date - 1 day date if not then it will have current date. Is that ok with you?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Wed Feb 02, 2011 4:05 pm    Post subject: Reply with quote

just thinking out loud...

create a dataset with what you want for a date in a format that can be manipulated when the job runs as it's only record.
For example: 2011031
then before your ftp runs... read that record and
That date can then be formatted using rexx or what ever into the control card that you need for your FTP.
Then run your ftp.
Then use rexx or whatever again to add one day to that date so it can be used for the next days run.
Back to top
View user's profile Send private message
radkrish82
Beginner


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Wed Feb 02, 2011 8:30 pm    Post subject: Reply with quote

Yes, Kolusu. It is what exactly what i wanted.
Back to top
View user's profile Send private message
radkrish82
Beginner


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Wed Feb 02, 2011 8:41 pm    Post subject: Reply with quote

Thanks Taltyman. I am trying with different options. In worst case, i will wite a cobol code to manipulate it.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Feb 03, 2011 11:48 am    Post subject: Reply with quote

radkrish82,

Use the following DFSORT JCL which will give you the desired results. If the job runs between midnight (000000) and 10 am (100000) then you will have current date-1 else you will have current date.

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                   
A                                                                 
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  INREC IFTHEN=(WHEN=INIT,BUILD=(DATE1,X,TIMENS=(24),80:X)),     
  IFTHEN=(WHEN=(10,6,ZD,GE,0,AND,10,6,ZD,LT,100000),             
  OVERLAY=(20:1,8,Y4T,SUBDAYS,+1,TOGREG=Y4T)),                   
  IFTHEN=(WHEN=NONE,OVERLAY=(20:DATE1))                           
                                                                 
  OUTREC IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=24,ENDPOS=25,       
   INOUT=(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'))),
  IFTHEN=(WHEN=INIT,                                             
  BUILD=(C'MKDIR WWM\FGR\',20,4,C'\',24,3,C'\',27,2,             
         C'\FILE\FILENAME.',80:X))                               
/*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

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


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Thu Feb 03, 2011 12:58 pm    Post subject: Reply with quote

techincally awesome. I will try tomrw morning once i reach my desk.
Instead of build i will use overlay IFTHEN=(WHEN=1,5,ch,eq,'MKDIR').
I think i need to give the condition(MKDIR is found) in OUTREC IFTHEN before findrep
Thanks, Kolusu.
Back to top
View user's profile Send private message
radkrish82
Beginner


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Fri Feb 04, 2011 7:14 am    Post subject: Reply with quote

Code:
1ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                               
 ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES
 ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 07:12 ON FRI
0           SORT FIELDS=COPY                                                   
            INREC IFTHEN=(WHEN=INIT,BUILD=(DATE1,X,TIMENS=(24),80:X)),         
            IFTHEN=(WHEN=(10,6,ZD,GE,0,AND,10,6,ZD,LT,100000),                 
            OVERLAY=(20:1,8,Y4T,SUBDAYS,+1,TOGREG=Y4T)),                       
                                $                                             
 ICE007A E SYNTAX ERROR                                                       
             IFTHEN=(WHEN=NONE,OVERLAY=(20:DATE1))                             
             $                                                                 
 ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY         
             OUTREC IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=24,ENDPOS=25,         
             INOUT=(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'))),   
            IFTHEN=(WHEN=INIT,                                                 
            BUILD=(C'MKDIR WWM\FGR\',19,4,C'\',24,3,C'\',27,2,                 
                   C'\FILE\FILENAME.',80:X))                                   
 ICE751I 0 C5-K51707 C6-K51707 C7-K54603 C8-K51707 E7-K51707                   
 ICE052I 3 END OF DFSORT


Seems like my shop PTF doesn't support SUBDAYS.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Feb 04, 2011 11:29 am    Post subject: Reply with quote

radkrish82,

Use the following DFSORT JCL which will give you the desired results.

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *                                                 
A                                                               
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                             
  INREC IFTHEN=(WHEN=INIT,BUILD=(DATE1,X,TIMENS=(24))),         
  IFTHEN=(WHEN=(10,6,ZD,GE,0,AND,10,6,ZD,LT,100000),           
  OVERLAY=(DATE1-1))                                           
                                                               
  OUTREC IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=5,ENDPOS=6,       
  INOUT=(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'))),
  IFTHEN=(WHEN=INIT,                                           
   BUILD=(C'MKDIR WWM\FGR\',1,4,C'\',5,3,C'\',8,2,             
          C'\FILE\FILENAME.',80:X))                             

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

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


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Sat Feb 05, 2011 8:44 am    Post subject: Reply with quote

Thanks Kolusu for your immense help.
Back to top
View user's profile Send private message
radkrish82
Beginner


Joined: 19 Feb 2009
Posts: 50
Topics: 10

PostPosted: Wed Feb 23, 2011 7:38 am    Post subject: Reply with quote

Sorry for the trouble again to add my question in the same post.
Same requirement. Below is my file FB 80char.

Code:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+--
 000003  Password1                                                         
 000004  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC                       
 000005  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE1         
 000006     CD \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE1         
 000007  PUT 'YYYXXX.REPORT.SORTFILE1.BUBBLE1.DTAX' SORTFILE1_01.txt     
 000008  PUT 'YYYXXX.REPORT.SORTFILE1.BUBBLE2.DTAX' SORTFILE1_02.txt     
 000009  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE2
 000010     CD \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE2
 000011  PUT 'YYYXXX.REPORT.SORTFILE3.BUBBLE1.DTAX' SORTFILE3_01.txt     
 000012  PUT 'YYYXXX.REPORT.SORTFILE3.BUBBLE2.DTAX' SORTFILE3_02.txt     
 000013  PUT 'YYYXXX.REPORT.SORTFILE4.BUBBLE1.DTAX' SORTFILE4_01.txt     
 000014  PUT 'YYYXXX.REPORT.SORTFILE4.BUBBLE2.DTAX' SORTFILE4_02.txt     
 000015  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE3         
 000016     CD \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE3


--------------------------------------------------------------------------------

Code:
SORT FIELDS=COPY                                                   
 INREC IFTHEN=(WHEN=INIT,BUILD=(DATE1,X,TIMENS=(24))),             
 IFTHEN=(WHEN=(10,6,ZD,GE,0,AND,10,6,ZD,LT,100000),                 
 OVERLAY=(DATE1-1))                                                 
                                                                   
 OUTREC IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=5,ENDPOS=6,             
 INOUT=(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'))),     
      IFTHEN=(WHEN=(3,5,CH,EQ,C'MKDIR',OR,6,2,CH,EQ,C'CD'),         
  OVERLAY=(19:1,4,C'\',25:5,3,C'\',29:8,2))                         
/*                                                                 
//       




I am trying to replace only the following values
YEAR\JAN\01 dynamically. But If I give overlay then my output looks like

Code:
 =COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
 000001 2011FEB22 073558             
 000002 2011FEB22 073558             
 000003 2011FEB22 073558             
 000004 2011FEB22 073558             
 000005 2011FEB22 073558             
 000006 2011FEB22 073558             
 000007 2011FEB22 073558             
 000008 2011FEB22 073558             
 000009 2011FEB22 073558             
 000010 2011FEB22 073558             
 000011 2011FEB22 073558             
 000012 2011FEB22 073558             
 000013 2011FEB22 073558             
 000014 2011FEB22 073558             


can you pls correct me.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Feb 23, 2011 12:15 pm    Post subject: Reply with quote

radkrish82,

You really need to understand how the control cards work. You just can't use the same when your input changes. I showed you an example of how to check the time and adjust the date without any regards to what the input is. I was just building the record with just date and time using INREC

Use the following DFSORT JCL which will build a dynamic FINDREP statement to replace the 'YEAR\JAN\01' with appropriate year\month\day with a test of time.


Code:

//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
A                                                                       
//SORTOUT  DD DSN=&&C1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)             
//SYSIN    DD *                                                         
  SORT FIELDS=COPY                                                     
  INREC IFTHEN=(WHEN=INIT,BUILD=(DATE1,TIMENS=(24),14X)),               
  IFTHEN=(WHEN=(9,6,ZD,GE,0,AND,9,6,ZD,LT,100000),OVERLAY=(DATE1-1))   
                                                                       
  OUTREC IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=5,ENDPOS=6,               
   INOUT=(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')))       
                                                                       
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                                 
  HEADER1=(3:'OPTION COPY',/,                                           
           3:'INREC FINDREP=(INOUT=(C''','YEAR\JAN\01''',               
             ',C''',1,4,'\',5,3,'\',8,2,'''','))')                     
//*
//STEP0200 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD *
  PASSWORD1                                                     
  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC                       
  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE1                 
     CD \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE1                 
  PUT 'YYYXXX.REPORT.SORTFILE1.BUBBLE1.DTAX' SORTFILE1_01.TXT   
  PUT 'YYYXXX.REPORT.SORTFILE1.BUBBLE2.DTAX' SORTFILE1_02.TXT   
  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE2                 
     CD \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE2                 
  PUT 'YYYXXX.REPORT.SORTFILE3.BUBBLE1.DTAX' SORTFILE3_01.TXT   
  PUT 'YYYXXX.REPORT.SORTFILE3.BUBBLE2.DTAX' SORTFILE3_02.TXT   
  PUT 'YYYXXX.REPORT.SORTFILE4.BUBBLE1.DTAX' SORTFILE4_01.TXT   
  PUT 'YYYXXX.REPORT.SORTFILE4.BUBBLE2.DTAX' SORTFILE4_02.TXT   
  MKDIR \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE3                 
     CD \AAAAAAAAA\YEAR\JAN\01\BBBB\CCCCC\FILE3                 
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD DSN=&&C1,DISP=SHR                                 

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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