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

Problem with INREC


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

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Jun 13, 2008 10:11 am
Reply with quote

Hi frieds,
I came accross this problem recently when I am trying out solution for the topic "Select some records using DFSORT"
Ex:
Code:

//STEPS200 EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//IN1      DD *                                               
11111VVVV                                                     
22222BBBB                                                     
33333CCCC                                                     
33333DDDD                                                     
//TOOLIN   DD *                                               
  SELECT FROM(IN1) TO(OUT1) USING(CTL1) NODUPS ON(1,5,CH)     
  SELECT FROM(IN1) TO(OUT2) USING(CTL2) NODUPS ON(1,5,CH)     
//CTL1CNTL DD *                                               
  INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))                 
  SORT FIELDS=COPY                                             
//CTL2CNTL DD *                                               
  INREC OVERLAY=(41:SEQNUM,8,ZD,RESTART=(1,5))                 
  SORT FIELDS=COPY                                             
//OUT1     DD  DSN=MNAX.OUTPUT.BALU1,DISP=(,CATLG,DELETE),     
//            SPACE=(90,(10,5),RLSE),AVGREC=K,                 
//            LRECL=90,RECFM=FB                               
//OUT2     DD  DSN=MNAX.OUTPUT.BALU2,DISP=(,CATLG,DELETE),     
//            SPACE=(90,(10,5),RLSE),AVGREC=K,                 
//            LRECL=90,RECFM=FB                               

This jcl is just adding a seqnum to the input file.
For OUT1, addtion is done at 81 st col
For OUT2, addtion is done at 41 st col
But the
OUT1 :
Code:

11111VVVV     
22222BBBB     

OUT2:
Code:

11111VVVV                               00000001                     
22222BBBB                               00000001                     

Accoding to the jcl seqnum should be added to both OUT1 and OUT2
why is this not happening?
Please let me know..

Thanks,
Balu
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Jun 13, 2008 2:45 pm
Reply with quote

vvmanyam,

check your output file again.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Jun 13, 2008 5:39 pm
Reply with quote

Hi Aaru,
I came accross this problem many times.
I am not understading why is this happening?
Belive me I have checked it once again... icon_confused.gif
Thanks,
Balu
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jun 13, 2008 5:44 pm
Reply with quote

In out1 the seqnum starts in position 81 have you tried looking in that part of the records in out1? If you are just looking at the first 80 characters of the record you won't see the seqnum in out1.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Jun 13, 2008 6:35 pm
Reply with quote

Hi Craq Giegerich,
I have looked at the right position.
I am not understading..
I have posted the exact jcl what I have submitted.

Thanks,
Balu
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Jun 13, 2008 6:44 pm
Reply with quote

Hi,

One more thing is
when I copied the input to a file with record length of 90 I am getting the desired output. But If have the input file of record length 80 I am not getting the desired output.

Thanks,
Balu
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Jun 13, 2008 7:35 pm
Reply with quote

vvmanyam,

Quote:
But If have the input file of record length 80 I am not getting the desired output.


Come on. You should have given these details in your first post.

How do u expect the seqnum to be populated in the 81st position when the input record length is 80???
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Jun 13, 2008 7:56 pm
Reply with quote

Hi,
What ever I have executed same thing I have given in the first post, there is no change in that, later I just tried to copy in to a dataset of diffrent lengths and tried.

Quote:

How do u expect the seqnum to be populated in the 81st position when the input record length is 80???


When we use INREC the records will be copied to temparary dataset, So, I don't think input file record length should be 90.
If so,
why is the following jcl is working perfectly..
Code:

//STEPS200 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN1      DD DSN=MNAX.INPUT.BALU,DISP=SHR                   
//TOOLIN   DD *                                             
  SORT FROM(IN1) TO(OUT1) USING(CTL1)                       
//CTL1CNTL DD *                                             
  INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))               
  SORT FIELDS=COPY                                           
//OUT1     DD  DSN=MNAX.OUTPUT.BALU1,DISP=(,CATLG,DELETE),   
//            SPACE=(90,(10,5),RLSE),AVGREC=K,               
//            LRECL=90,RECFM=FB                             

Input to this dataset is same as what I have posted in the first post.
Please let me if I am wrong...
Thanks,
Balu[/quote]
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Jun 13, 2008 8:40 pm
Reply with quote

vvmanyam,

Quote:
When we use INREC the records will be copied to temparary dataset, So, I don't think input file record length should be 90.


OK.


but i executed the same JCL (first post) and i was able to see the seqnum starting from the 81st column.

No clue as to why it is not working fro you. Just wait for frank to assit you.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Jun 13, 2008 9:05 pm
Reply with quote

vvmanyam,

Show us the sysout from DFSMSG DD from the job you ran.
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: Mon Jun 16, 2008 4:17 am
Reply with quote

Balu,

When I run your job, I get the sequence numbers in 81-88.

My guess would be that you don't have the DFSORT April, 2006 PTF installed that supports the full use of INREC with SELECT. If you show us your //DFSMSG messages, as Kolusu requested, we can confirm that.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Mon Jun 16, 2008 8:36 am
Reply with quote

Hi Frank,
For this JCL
Code:

//STEPS200 EXEC PGM=ICETOOL                               
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN1      DD *                                           
11111VVVV                                                 
22222BBBB                                                 
33333CCCC                                                 
33333DDDD                                                 
//TOOLIN   DD *                                           
  SELECT FROM(IN1) TO(OUT1) USING(CTL1) NODUPS ON(1,5,CH) 
//CTL1CNTL DD *                                           
  INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))             
  SORT FIELDS=COPY                                         
//OUT1     DD  DSN=MNAX.OUTPUT.BALU1,DISP=(,CATLG,DELETE),
//            SPACE=(90,(10,5),RLSE),AVGREC=K,             
//            LRECL=90,RECFM=FB                           

The following is the DFSMSG for this job
I actually don't have idea of this so, I am copying entire thing

Code:

1ICE200I 0 IDENTIFIER FROM CALLING PROGRAM IS 0001                                                                   
 ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                                                     
 ICE000I 0 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 22:47 ON SUN JUN 15, 2008 -                           
0            INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))                                                             
             SORT FIELDS=COPY                                                                                         
 ICE146I 0 END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW                                         
           DEBUG NOABEND,ESTAE                                                                                       
           OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL1,SORTIN=IN1,SO*                                   
                          RTOUT=OUT1,DYNALLOC,SZERO,EQUALS,NOVLSHRT,LOCALE=NONE,NO*                                   
                          CHECK                                                                                       
           SORT FIELDS=(1,5,CH,A)                                                                                     
           MODS E35=(ICE35DU,12288)                                                                                   
 ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                                                               
 ICE193I 0 ICEAM2 ENVIRONMENT IN EFFECT - ICEAM2 INSTALLATION MODULE SELECTED                                         
 ICE088I 0 CG83TEST.STEPS200.        , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB                                     
 ICE093I 0 MAIN STORAGE = (MAX,8388608,8359936)                                                                       
 ICE156I 0 MAIN STORAGE ABOVE 16MB = (6291456,6291456)                                                               
 ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=300         
 ICE128I 0 OPTIONS: SIZE=8388608,MAXLIM=2097152,MINLIM=1048576,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=DFSMSG               
 ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N             ,ABCODE=MSG 
 ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=N,WRKREL=N,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB2             
 ICE131I 0 OPTIONS: TMAXLIM=8388608,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW=Y,DSA=0                             
 ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N       
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N         
ICE084I 0 EXCP ACCESS METHOD USED FOR OUT1                                                 
ICE084I 0 BSAM ACCESS METHOD USED FOR IN1                                                   
ICE090I 0 OUTPUT LRECL = 90, BLKSIZE = 27990, TYPE = FB                                     
ICE171I 0 SORTOUT LRECL OF 90 IS DIFFERENT FROM SORTIN(NN) LRECL OF 80 - RC=0               
ICE055I 0 INSERT 2, DELETE 4                                                               
ICE054I 0 RECORDS - IN: 4, OUT: 2                                                           
ICE751I 0 C5C6C7C8E9C9E5E7EFF0E8                                                           
ICE052I 0 END OF DFSORT                                                                     


Thnaks,
Balu
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: Mon Jun 16, 2008 8:21 pm
Reply with quote

Balu,

Yes, that confirms that you don't have the April, 2006 PTF installed. In fact, you don't even have the Dec, 2004 PTF installed. Ask your System Programmer to install DFSORT R14 PTF UK90006 - that will get you all of the latest DFSORT functions.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Tue Jun 17, 2008 8:18 am
Reply with quote

Hi Frank,

Thanks for the update





Thanks,
Balu
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Tue Jun 17, 2008 9:38 am
Reply with quote

Hi Frank,
Can u help me in understanding DFSMSG and identify the exact functioning of functions used.
Any link which contains the details of DFSMSG?

Thanks,
Balu
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 Jun 17, 2008 9:31 pm
Reply with quote

I don't understand what you're asking for.

DFSMSG is the message data set for the DFSORT messages. It just displays the DFSORT control statements and messages.

If you're asking for information on DFSORT and ICETOOL, you can find all of the DFSORT books at:

Use [URL] BBCode for External Links

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.

However, keep in mind that you won't be able to use a lot of the functions described until your System Programmer gets your version of DFSORT up to the latest level.
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top