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
 

 

jcl-stop condition

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

New User


Joined: 08 Mar 2005
Posts: 54
Location: Chennai

PostPosted: Fri Aug 05, 2005 8:05 pm    Post subject: jcl-stop condition
Reply with quote

hello guys i have a problem can any body give solution for that it should be only on jcl not in cobol

i have a vsam esds file which has record like this


aaaaa 3
xabaaaa 53
fcxaaaaaa 534
xaaaaa 53
vaaeaaa67766
avaaaa6676
eeeee end of day record--------
eaaaaa 53
vaaeaaa67766
avaaaa6676


i want to copy the records from the above file and put it another vsam esds file but the condition

is the should top copying if it finds letter e in the first char of the record
and it has to copy the records until it finds the letter e.


can any body give solution for this since
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: Sun Aug 07, 2005 8:25 pm    Post subject:
Reply with quote

In private notes, we established that rsshanmugam wants to copy up to but not including the first record with an 'e' in position 1. Here's a DFSORT job that will do that. It generates an OPTION STOPAFT=n statement with n equal to the relative record number of the target record minus 1. In the above example, n=7-1=6. Note that it will actually generate an OPTION STOPAFT=n statement for each record with an 'e' in position 1, but DFSORT will only use the first one and ignore the others as duplicate control statements.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
aaaaa 3
xabaaaa 53
fcxaaaaaa 534
xaaaaa 53
vaaeaaa67766
avaaaa6676
eeeee end of day record--------
eaaaaa 53
vaaeaaa67766
avaaaa6676
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
 COPY FROM(IN) USING(CTL1)
 COPY FROM(IN) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:SEQNUM,8,ZD)
  OUTFIL FNAMES=CTL2CNTL,REMOVECC,
    INCLUDE=(1,1,CH,EQ,C'e'),
    OUTREC=(C' OPTION STOPAFT=',81,8,ZD,SUB,+1,M11,LENGTH=8,80:X)
/*
//CTL2CNTL DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
Back to top
View user's profile Send private message
stalin.i@gmail.com

New User


Joined: 18 Apr 2005
Posts: 8
Location: chennai

PostPosted: Tue Aug 09, 2005 10:34 pm    Post subject: some change
Reply with quote

hai frank,
i am rssshanmugam's teammate. first of all i would like to thank you for your response.

the JCL abends with maxcc 16 when i used this

Code:

  INREC OVERLAY=(81:SEQNUM,8,ZD)
            $


i changed it to

Code:

  INREC FIELDS=(1:1,80,81:SEQNUM,8,ZD)


and the JCL works well. now i want to know

1. why overlay is not working. we r using DFSORT version 14 (not sure)?

2. what should i do if the file is varying length type?
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 09, 2005 10:51 pm    Post subject:
Reply with quote

Quote:
1. why overlay is not working. we r using DFSORT version 14 (not sure)?


You need z/OS DFSORT V1R5 PTF UQ95213 or DFSORT R14 PTF UQ95213 (Dec, 2004) to use DFSORT's new OVERLAY feature. The syntax error indicates you don't have this PTF installed. Ask your System Programmer to install it (it's free).

Quote:
2. what should i do if the file is varying length type?


You can use this variation of the DFSORT job for VB records:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (VB)
//OUT DD SYSOUT=*
//TOOLIN DD *
 COPY FROM(IN) USING(CTL1)
 COPY FROM(IN) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,5,6:SEQNUM,8,ZD)
  OUTFIL FNAMES=CTL2CNTL,REMOVECC,
    VTOF,
    INCLUDE=(5,1,CH,EQ,C'e'),
    OUTREC=(C' OPTION STOPAFT=',6,8,ZD,SUB,+1,M11,LENGTH=8,80:X)
/*
//CTL2CNTL DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
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. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts File matching using specific condition mf_karthik DFSORT/ICETOOL 3 Fri Nov 20, 2015 11:04 pm
No new posts INCLUDE condition for 'Contains' krsenthil85 DFSORT/ICETOOL 4 Mon Oct 26, 2015 11:03 pm


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