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 

Discard Header Record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Tue Feb 24, 2004 2:20 pm    Post subject: Discard Header Record Reply with quote

Hi ,

Can we do this with IEBGENER ?
If not , any similar utility which can both Discard the Header (its the first record of a FB file) and Copy remaining detail records ?!! I need Copy because at the same time I have to Club Six 80 byte records into one 480 byte record ..yet discard the first 80 byte record. I know how to do that trick with Blocksize Wink but hav no clue around discarding of input records. Dont want to change the program.

Thnks.
Vini

P.S : Search on Discard/Remove header did not yield any post ..


Last edited by vini on Tue Feb 24, 2004 6:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Feb 24, 2004 3:34 pm    Post subject: Reply with quote

You can discard the first record and copy the rest of the records with a DFSORT job like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   input file
//SORTOUT DD DSN=...   output file
//SYSIN DD *
  OPTION COPY,SKIPREC=1
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Tue Feb 24, 2004 4:03 pm    Post subject: Reply with quote

Frank ,

I got an Error ... checked the description but cannot make out any inconsistency in file dispositions or anything .

    ICE061A 5 I/O ERROR, DD SORTIN , DEV 36D0, ECB 41, CSW 0D40, SENSE 0000 .


Step was as follows :
Code:

//RUN EXEC PGM=ICEMAN                                               
//SYSOUT    DD SYSOUT=*                                             
//SORTIN    DD DSN=WLFA.WOJI.WHUK90.BLK480.SEQ,LRECL=480,DISP=SHR   
//SORTOUT   DD DSN=WLFA.WOJI.WHUK90.LRE480.SEQ,DISP=OLD             
//SYSIN     DD *                                                     
  OPTION COPY,SKIPREC=1                                             
/*                                                                   


Do you see anything obvious ?! The Step before this is one where I execute FTP to GET a File into the SORTINs DD.

Vini
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Feb 24, 2004 5:01 pm    Post subject: Reply with quote

From what you said before, I guess your SORTIN data set has LRECL=80, but you're trying to override it to LRECL=480 to group 6 records. You can't do that in the same step in which you use SKIPREC=1. You need to use SKIPREC=1 first to get rid of the header record and then use LRECL=480 in a second step. Something like this:

Code:

//S1 EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                           
//SORTIN    DD DSN=WLFA.WOJI.WHUK90.BLK480.SEQ,DISP=SHR                     
//SORTOUT DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS), 
// LRECL=80,BLKSIZE=480                                           
//SYSIN     DD *                                                 
  OPTION COPY,SKIPREC=1                                           
/*
//S2 EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                           
//SORTIN DD DSN=&&T1,DISP=(OLD,PASS),LRECL=480         
//SORTOUT   DD DSN=WLFA.WOJI.WHUK90.LRE480.SEQ,DISP=OLD
//SYSIN     DD *                                                 
  OPTION COPY                                                     
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Tue Feb 24, 2004 5:51 pm    Post subject: Reply with quote

Frank ,

This time I did not try to do the trick in same Step as Skiprec ...yet I got Strange Errors ...

1) On EXEC IEBGENER in S2.

Informational error : 'Conflicting DCB Parms ..'

This wasnt unexpected but since its Informational I thought the File would have gotten created atleast but I was wrong ..input had a 100 recs and output none Neutral .

2) On EXEC ICEMAN in S2

CTMC30I CMEM IS ALREADY ACTIVE FOR THIS JOB -

Never seen this error before ..whats it supposed to exactly mean .the description wasnt really helpful Confused Zero records in output again.

Pls. suggest .. I know this is workable but just not been lucky so far. Smile

Thnks.
Vini
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Feb 24, 2004 6:49 pm    Post subject: Reply with quote

My DFSORT job works fine when the number of input records is a multiple of 6 plus 1 (e.g. 61 records). Removing the header record in step 1 results in a multiple of 6 records which fillsl out the LRECL of 480 for step2 evenly. But when the number of records is NOT a multiple of 6 plus 1 (e.g. 100), I get an I/O error for step2. I think to do your LRECL=480 trick successfully, you have to have an even multiple of 6 records.

I don't know what that CTMC30I message means ... I've never seen it.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Wed Feb 25, 2004 9:59 am    Post subject: Reply with quote

Frank ,

The Actual number of Input records is 8557 inclusive of Header.
100 was at random .. used for example sake. Now 8556 is an even multiple of 6...seems like the problem is elsewhere ...

Here is my version of the JCL.
Code:

//S0        EXEC PGM=FTP,REGION=1M,PARM='(EXIT',COND=(00,NE)     
//SYSIN     DD *                                                 
172.20.2.1                                                       
UIVS013 GREASE                                                   
CD ..                                                             
GET UJ.OH39HITS(+0) 'WLFA.WOJI.WHUK90.BLK480.SEQ' (REPLACE       
QUIT                                                             
/*                                                               
//S1 EXEC PGM=ICETOOL                                               
//SYSOUT    DD SYSOUT=*                                             
//SORTIN    DD DSN=WLFA.WOJI.WHUK90.BLK480.SEQ,LRECL=80,DISP=SHR     
//SORTOUT   DD DSN=&&T1,DISP=(,PASS),LRECL=80,BLKSIZE=480           
//SYSIN     DD *                                                     
  OPTION COPY,SKIPREC=1                                             
/*                                                                   
//S2 EXEC PGM=ICETOOL                                               
//SYSOUT    DD SYSOUT=*                                             
//SORTIN    DD DSN=&&T1,LRECL=480,DISP=(OLD,PASS)                   
//SORTOUT   DD DSN=WLFA.WOJI.WHUK90.LRE480.SEQ,DISP=OLD             
//SYSIN     DD *                                                     
  OPTION COPY                                                       
/*       
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Feb 25, 2004 11:29 am    Post subject: Reply with quote

I'm confused. You said
Quote:
2) On EXEC ICEMAN in S2

CTMC30I CMEM IS ALREADY ACTIVE FOR THIS JOB -


But you're NOT using PGM=ICEMAN - you're using PGM=ICETOOL. Are you getting the CTMC30I message for the S2 PGM=ICETOOL step?

CTMC30I message is not a DFSORT/ICETOOL message. LookAt couldn't find it. So I don't know which product/component is issuing this message. Did you get any DFSORT messages (ICExxxI) in //SYSOUT? If so, post them along with any JES error messages you got.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Wed Feb 25, 2004 12:12 pm    Post subject: Reply with quote

Frank ,

Sorry for the confusion .. I myself get confused with ICEMAN vs. ICETOOL ..guess I dont understand the difference so messed them up ....to me they probably mean the same thing , guess they arent ..

I was executing ICETOOL ...and after I corrected that to ICEMAN things look better ...sure they do Smile

Theres one thing I am still unable to get to ..its the Clubbing of 6 records of 80 bytes into 1 record of 480 Lrecl...despite doing this in a seperate step and despite using non-temp DS.
Correct me if I am wrong ...to achieve this ..all we need to do is Execute ICEMAN with Copy from a Source DS of 80 Lrecl ,Blksize 480 ..into a 480 Lrecl DS ?!!! and ofcors the Input File should have even multiple of 6 number of records. Both of these things are True in my case ...still ....with ICEMAN I get no error message ..strange ..yet that steps return code is 16.
What I do get in final output are each 80 byte onto a 480 instead of
6 * 80 = 1*480.

Thanks for ur patience.
Vini


Last edited by vini on Wed Feb 25, 2004 1:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Feb 25, 2004 12:42 pm    Post subject: Reply with quote

Vini,

Quote:
I myself get confused with ICEMAN vs. ICETOOL ..to me they probably mean the same thing , guess they arent


PGM=ICEMAN (or PGM=SORT) executes DFSORT. PGM=ICETOOL executes DFSORT's ICETOOL. ICETOOL is an extension to DFSORT. ICEMAN and ICETOOL use different JCL statements. PGM=ICETOOL will NOT work with the JCL statements for PGM=ICEMAN. You can find complete descriptions of DFSORT and ICETOOL in "DFSORT Application Programming Guide", available online from:

http://www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

I don't know what's happening with your job. You didn't post the JES and //SYSOUT messages as I asked, so I can't see what's happening. However, I ran this job that's similar to yours with 61 input records. It produced ten 480-byte records as expected. Perhaps looking at this successful job and its messages (below) will help you figure out what's going on with your job.

Code:

//S1 EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                           
//SORTIN DD DSN=Y897797.VINI1.IN,DISP=SHR                       
//SORTOUT DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS),
// LRECL=80,BLKSIZE=480                                         
//SYSIN     DD *                                                 
  OPTION COPY,SKIPREC=1                                         
/*
//S2 EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                           
//SORTIN DD DSN=&&T1,DISP=(OLD,PASS),LRECL=480                   
//SORTOUT DD DSN=&&O1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS),
// LRECL=480                                                     
//SYSIN     DD *                                                 
  OPTION COPY                                                   
/*
//SHOW EXEC PGM=ICEMAN                 
//** READ/PRINT RECORDS FROM DATA SET CREATED BY S2
//SYSOUT   DD SYSOUT=*                 
//SORTIN DD DSN=&&O1,DISP=(OLD,PASS)   
//SORTOUT DD SYSOUT=*                 
//SYSIN     DD *                       
  OPTION COPY                         
/*


Here are the relevent DFSORT messages for S1, S2 and SHOW:

Code:

ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 09:35 ON WED FEB 25, 2004 -
            OPTION COPY,SKIPREC=1
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 VINI1   .S1      .        , INPUT LRECL = 80, BLKSIZE = 480, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,4194304,4194304)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4097646,4097646)
...
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN
ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 480, TYPE = FB
ICE055I 0 INSERT 0, DELETE 1
ICE054I 0 RECORDS - IN: 61, OUT: 60
ICE751I 0 C5C6C7C8E9C9E5E7EFF0E8
ICE052I 0 END OF DFSORT
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 09:35 ON WED FEB 25, 2004 -
            OPTION COPY
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 VINI1   .S2      .        , INPUT LRECL = 480, BLKSIZE = 480, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,4194304,4194304)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4102128,4102128)
...
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN
ICE090I 0 OUTPUT LRECL = 480, BLKSIZE = 27840, TYPE = FB   (SDB)
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 10, OUT: 10
ICE751I 0 C5C6C7C8E9C9E5E7EFF0E8
ICE052I 0 END OF DFSORT
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 09:35 ON WED FEB 25, 2004 -
            OPTION COPY
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 VINI1   .SHOW    .        , INPUT LRECL = 480, BLKSIZE = 27840, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,4194304,4189278)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4087750,4087750)
...
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN
ICE090I 0 OUTPUT LRECL = 480, BLKSIZE = 27840, TYPE = FB
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 10, OUT: 10
ICE751I 0 C5C6C7C8E9C9E5E7EFF0E8
ICE052I 0 END OF DFSORT

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vini
Intermediate


Joined: 12 Jan 2004
Posts: 240
Topics: 48
Location: Maryland

PostPosted: Wed Feb 25, 2004 2:21 pm    Post subject: Reply with quote

Frank ,
Your Awesome !!!
The JCL you provided ..works Perfectly for all my needs ! Very Happy .

Thanks
Vini
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Feb 25, 2004 3:29 pm    Post subject: Reply with quote

Good.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Oct 29, 2010 4:03 pm    Post subject: Reply with quote

With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use the new RESIZE operator of DFSORT's ICETOOL to do this more easily and in only one pass like this:

Code:

//S1    EXEC  PGM=ICETOOL                                     
//TOOLMSG DD SYSOUT=*                                         
//DFSMSG  DD SYSOUT=*                                         
//IN DD DSN=...  input file (FB/80)                       
//OUT DD DSN=...  output file (FB/480)   
//TOOLIN DD *                                                 
RESIZE FROM(IN) TO(OUT) TOLEN(480) USING(CTL1)               
//CTL1CNTL DD *                                               
  OPTION SKIPREC=1                                           
/*


For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
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 -> Job Control Language(JCL) 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