Issue with copy command!!



Compuware's data management products: File-AID for IMS, File-AID/MVS, File-AID for DB2 and DBA-XPERT for DB2

Issue with copy command!!

Postby ibmmf4u » Tue Mar 20, 2012 10:48 pm

Hi Everyone,

Here is my requirement , am trying to extract few records from a VBA file using the file-aid batch. Below mentioned is the piece of code which i used

//STEP040 EXEC PGM=FILEAID
//DD01 DD DSN=SAMPLE.TEST.DATA,DISP=SHR
//DD01O DD DSN=SAMPLE.TEST.OUTPUT,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
$$DD01 COPY IF=(58,EQ,C'IEF404I')
/*
//


It should be ideally copying the records which has IEF404I in the 58th position. But when am running the batch program its throwing me an RC=08 , checked at the sysprint of the job and it displayed the following message

DD01 DSN=SAMPLE.TEST.DATA OPENED AS PS,
RECFM=VB,LRECL=137,BLKSIZE=32760,VOL=TLC226
DD01O DSN=SAMPLE.TEST.OUTPUT OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=800,VOL=T2C01A
$$DD01 COPY IF=(58,EQ,C'IEF404I') 0036000
ABOVE FUNCTION ENDED ON NORMAL EOD RC=0

RECORDS-READ=973205
0 RECORDS WRITTEN TO DD01O-SAMPLE.TEST.OUTPUT
VOL=T2C01A



It didn't provide much info , moreover it shows that it has read the input data but copy feature hasn't been invoked.I don't think it failed while copying VBA file to FB file because i did the same through online(file-aid) it did work. Please guide me through the process of correcting it.

Please help me out in resolving it!!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Issue with copy command!!

Postby Robert Sample » Wed Mar 21, 2012 2:32 am

There's nothing for us to guide you to correct. File Aid went through almost a million records, found no matches, and quit.

Personally, if I were in your shop I would be asking questions like:
1. Why are you copying 133-byte records to 80-byte records?
2. Why are you doing the copying without specifying which bytes to copy and which to delete?
3. How did you determine the starting byte for your copy condition?
4. Did you adjust your starting byte offset for the variable formatted RDW?
etc
etc
etc
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Issue with copy command!!

Postby ibmmf4u » Fri Mar 23, 2012 12:17 pm

Hi Bob,

Thanks for quick reply.

Let me put my requirement in this way. I want to copy records which start in 58th position of input file and whose character is equals to "IEF404I". The input file which i will be receiving daily is an VB with LREC=133, there's no problem in copying either it into a FB LREC=80, VBA file.
But when i tried it through File-Aid online it worked fine for both the FB and VB irrespective of LREC so i just tried going with the FB file in the above JCL.
you are right the program is throwing a RC=08 while am using a FB file, but while doing the same with an VB file it went fine but the records weren't copied.

I tried the following command in the SYSIN statement $$DD01 COPY IF=(58,EQ,C'IEF404I') . I later checked in the input file and it has the records that satisfy my requirement. I guess there might be some issue with the copy command.

Kindly help me out!!! :)
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Issue with copy command!!

Postby Robert Sample » Fri Mar 23, 2012 4:18 pm

I guess there might be some issue with the copy command.
Considering how many thousands of times a day File Aid COPY is used, I sincerely doubt the problem is with the software. That means the problem with the copy command is ... YOU. And, by the way, a professional programmer when confronted with the issue you have asks "How did I mess up?" whereas the amateur programmer asks "What is wrong with the tool?" The File Aid manual indicates that there is an RDW parameter for variable-length input files in batch. The default setting, which presumably is set at your site, is to include the RDW which would mean your $$DD01 COPY IF=(58,EQ,C'IEF404I') is looking at byte 54 of the actual input data. Hence, no matches occur.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Issue with copy command!!

Postby ibmmf4u » Fri Mar 23, 2012 9:37 pm

Hi Bob,

Thanks for the reply.

"I guess there might be some issue with the copy command."

I meant to say that i might have used it wrongly. I didn't mean that there might be problem with the software, it might be the problem with me as you said because i can't able to sort out the root cause so i said i guess might something wrong in using the copy command as i might have used with wrong syntax or something else was missed out.

"How did I mess up?"

"What is wrong with the tool?"

Bob, am just a beginner i don't know how to put in the problem which i faced , earlier i might have used some words which lead to other way wrong. My sincere apologies on the same. As i came across this issue i just posted it.

Thanks for your inputs.
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Issue with copy command!!

Postby Robert Sample » Fri Mar 23, 2012 11:50 pm

Have you tried to change the offset to account for the RDW?

We get a lot of posts here asking why such-and-such tool is broken; the problem generally turns out to be PEBKAC. Not all such issues are resolved since the person posting must first believe that the problem is in their code, not the tool.

And, by the way, I go by "Robert".
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to File-AID

 


  • Related topics
    Replies
    Views
    Last post