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
 

 

NDM file transfer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Wed Oct 24, 2007 2:56 pm    Post subject: NDM file transfer
Reply with quote

I need to create a dynamic NDM card for file transfer between two systems. I have input file with generic card

Code:
SIGNON ESF=YES CASE=YES                                           
SUBMIT PROC=PROC1                                            - 
     NEWNAME=XXXXXX                                          - 
     PNODE=SYM1                                                 - 
     SNODE=UNIX2                                             - 
     &SNDNODE=PNODE                                             - 
     &RECNODE=SNODE                                             - 
     &DSN01=ABC.XXX.YYY.[i][b]DMMDDYY[/b][/i]                         - 
     &DISP01=(SHR,KEEP,KEEP)                                    - 
     &DSN02='work/data/t1.txt'                     - 
     &OPCJOB=XXXXXXX                                          - 
     &OPCNODE=PNODE                                               
SIGNOFF             


I have create a dynamic card everyday by replacing the
DSN01 = ABC.XXX.YYY.DMMDDYY with
ABC.XXX.YYY.D102407 (month/date/year) so that current file is transmitted every day.

Currently we are doing this in cobol program. I believe there should a much easier Solution using DFSORT using Date functions?
Back to top
View user's profile Send private message

Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Wed Oct 24, 2007 3:03 pm    Post subject:
Reply with quote

To add with this

The location of MMDDYY in the record varies depending on the DSN name length and we need to do inspect every record if MMDDYY is there and replace it with current date.

but strictly speaking we should not replace MMDDYY other than in &DSN01 but I assume MMDDYY will not be found in any other line in the control card.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed Oct 24, 2007 3:15 pm    Post subject:
Reply with quote

I believe in NDM, if you give dataset name with xx.dYYMMDD.ThhmmssT then then the literals YYMMDDD gets replaced with actual value and transmitted. We dont need to put the actual value, NDM does it.

Try and see if it works.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Oct 24, 2007 3:39 pm    Post subject:
Reply with quote

I think that in your case REXX will be much easier to write, test and maintain.

O.
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Wed Oct 24, 2007 4:49 pm    Post subject:
Reply with quote

We need to transmit the o/p of previous job which creates fataset with the DMMYYDD (D102207). so we cannot go in for xx.dYYMMDD.ThhmmssT

also Rexx /SAS option is also ruled out as we have prouctionizing issues.

Help me with some Solution using JCL.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed Oct 24, 2007 4:59 pm    Post subject:
Reply with quote

Quote:
some Solution using JCL
Please wait for Frank to give solution to your reqt using DFSORT
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Oct 24, 2007 6:33 pm    Post subject:
Reply with quote

Deepa.m
Here is a SORT JOB:
Code:
//*******************************************************               
//STEP1    EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
SIGNON ESF=YES CASE=YES                                                 
SUBMIT PROC=PROC1 -                                                     
NEWNAME=XXXXXX -                                                       
PNODE=SYM1 -                                                           
SNODE=UNIX2 -                                                           
&SNDNODE=PNODE -                                                       
&RECNODE=SNODE -                                                       
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
&DSN01=ABC.XXX.YYY.DMMDDYY -                                           
&DISP01=(SHR,KEEP,KEEP) -                                               
&DSN02='WORK/DATA/T1.TXT' -                                             
&OPCJOB=XXXXXXX -                                                       
&OPCNODE=PNODE                                                         
SIGNOFF                                                                 
/*                                                                     
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  SORT FIELDS=COPY                                                     
  INREC IFTHEN=(WHEN=(1,6,CH,EQ,C'&DSN01'),                             
        OVERLAY=(81:DATE1,21:85,2,23:87,2,25:83,2)),IFOUTLEN=80         
/*                                                                     


Assuming the file length is 80(as per my knowledge all the NDM control cards will be of length 80).

The SORTOUT will contain
Code:
SIGNON ESF=YES CASE=YES     
SUBMIT PROC=PROC1 -         
NEWNAME=XXXXXX -           
PNODE=SYM1 -               
SNODE=UNIX2 -               
&SNDNODE=PNODE -           
&RECNODE=SNODE -           
&DSN01=ABC.XXX.YYY.D102407 -
&DISP01=(SHR,KEEP,KEEP) -   
&DSN02='WORK/DATA/T1.TXT' -
&OPCJOB=XXXXXXX -           
&OPCNODE=PNODE             
SIGNOFF                     
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Oct 24, 2007 7:08 pm    Post subject:
Reply with quote

Deepa,

Does the file creation and transmission occur in the SAME JOB? If not what is the delay time? When does the creation job and transmission run (post with time)?
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 Oct 24, 2007 10:09 pm    Post subject:
Reply with quote

Quote:
The location of MMDDYY in the record varies depending on the DSN name length


Deepa,

I guess Krisprems missed this because his solution assumes the Ddate will always start in position 21. From what you said, it can start in other positions. Some examples:

&DSN01=ABCDEF.X.QRSTU.DMMDDYY -
&DSN01=A.B.C.DMMDDYY -

Here's a DFSORT job that will replace the &DSN01 record correctly regardless of where the Ddate starts:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,6,CH,EQ,C'&DSN01'),
    PARSE=(%01=(ABSPOS=8,ENDAT=C'.',FIXLEN=9),
           %02=(ENDAT=C'.',FIXLEN=9),
           %03=(ENDAT=C'.',FIXLEN=9)),
      BUILD=(C'&DSN01=',%01,%02,%03,71:DATE1),HIT=NEXT),
    IFTHEN=(WHEN=(1,6,CH,EQ,C'&DSN01'),
      OVERLAY=(51:C'D',75,4,73,2,71:10X,
        1:1,80,SQZ=(SHIFT=LEFT,TRAIL=C' -')))
/*
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Mon Dec 03, 2007 5:17 pm    Post subject:
Reply with quote

Frank,

Can i modify the same sort card for the below requirement

&DSN01=ABC.EF.X.QRSTU.DMMDDYY -
&DSN01=A.B.DMMDDYY -

where I have 4 qualifiers before DMMDDYY and sometimes only 2 qualifiers before DMMDDYY depending on the naming conventions we use.

The above code works for the fixed 3 qualifiers only.

&DSN01=ABCDEF.X.QRSTU.DMMDDYY -
&DSN01=A.B.C.DMMDDYY -
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: Mon Dec 03, 2007 11:24 pm    Post subject:
Reply with quote

Deepa,

Here's a DFSORT job that will handle any number of qualifiers. The trick is to use ENDBEFR=C'.DMMDDYY' in PARSE. Also, I used DATENS=(MDY) in INREC BUILD to get the mmddyy date more easily (I don't know why I didn't do that for the earlier job).

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC IFOUTLEN=80,
   IFTHEN=(WHEN=(1,6,CH,EQ,C'&DSN01'),
    PARSE=(%01=(ENDBEFR=C'.DMMDDYY',FIXLEN=80)),
    BUILD=(%01,81:C'.D',DATENS=(MDY)),HIT=NEXT),
   IFTHEN=(WHEN=(1,6,CH,EQ,C'&DSN01'),
    OVERLAY=(1,88,SQZ=(SHIFT=LEFT,TRAIL=C' -')))
/*


The following &DSN01 records:

Code:

&DSN01=ABC.XXX.YYY.DMMDDYY -     
&DSN01=ABCDEF.X.QRSTU.DMMDDYY -   
&DSN01=A.B.C.DMMDDYY -           
&DSN01=ABC.EF.X.QRSTU.DMMDDYY -   
&DSN01=A.B.DMMDDYY -             


would be output today (12/03/07) as:

Code:

&DSN01=ABC.XXX.YYY.D120307 -       
&DSN01=ABCDEF.X.QRSTU.D120307 -   
&DSN01=A.B.C.D120307 -             
&DSN01=ABC.EF.X.QRSTU.D120307 -   
&DSN01=A.B.D120307 -               
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: Tue Aug 19, 2008 4:13 am    Post subject:
Reply with quote

You can replace MMDDYY anywhere in your records quite easily now with DFSORT's new FINDREP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD *
TDATE,S'&MON.&DAY.&YR2'
/*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC FINDREP=(IN=C'MMDDYY',OUT=TDATE)
/*


If you need the local date, you can use:

Code:

//SYMNAMES DD *
TDATE,S'&LMON.&LDAY.&LYR2'
/*


For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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