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
 

 

Resetting return code=8 for empty output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Sat Nov 03, 2007 3:56 pm    Post subject: Resetting return code=8 for empty output
Reply with quote

Hi

I am using batch fileaid to check for some criteria in input file and writing those records satisfying the criteria to output file.

Whenever there is no record in input file satisfying the criteria, I am getting an empty output file(as required)and also a RC=8(This is what is expected as per FA manual),

Is there any way of getting rid of this RC 8, so that I can reset this to 0 or 4.

Thanks in advance,
Arun
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Sun Nov 04, 2007 2:25 pm    Post subject:
Reply with quote

Hi,

Sorry for making the requirement not clear.

My actual requirement is to check for numeric for specific positions and I want only those records with numeric values in the output file.

I think this is possible thru DFSORT, but in our shop we are using Syncsort.
As the same could be achieved thru file-aid, I went for that option;but ended up with RC 8 as I said earlier, whenever the output file is empty.

Thanks,
Arun
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Nov 04, 2007 5:39 pm    Post subject: Reply to: Resetting return code=8 for empty output
Reply with quote

What' s wrong in checking for a return code of 8 instead of 0
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Nov 05, 2007 11:29 am    Post subject:
Reply with quote

Arun,

Quote:
My actual requirement is to check for numeric for specific positions and I want only those records with numeric values in the output file.

If you can come with sample date (I/P and O/P)..... we may help you in SYNCSORT itself.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Nov 06, 2007 2:10 pm    Post subject:
Reply with quote

Ya sure, Here s my input....



Code:
000010305,0092 7041,0001,  11,   1,123453456
000010305,1692 7041,0001,  11,   1,123453456
000010305,16 237041,0001,  11,   1,123453456
000010305,169237041,0001,  11,   1,123453456
000010305,000000041,0001,  11,   1,123453456


I want to check for numeric in positions 1 - 9, 11-19 and 21-24.
please let me know if it is possible in syncsort

Thanks,
Arun
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Tue Nov 06, 2007 2:12 pm    Post subject:
Reply with quote

Arun,

I/P is fine. How about O/P?

I believe your should look lke-

Code:
000010305,169237041,0001,  11,   1,123453456
000010305,000000041,0001,  11,   1,123453456
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Tue Nov 06, 2007 2:16 pm    Post subject:
Reply with quote

Arun,

How could you forget 'YOUR OWN' post posted on 31 Oct 2007? Go thru the link below -

http://www.ibmmainframes.com/viewtopic.php?t=25651&highlight=syncsort
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Wed Nov 07, 2007 1:59 pm    Post subject:
Reply with quote

Hi Murali,

I have nt forgotten it....I admit that I got the required output (using FILEAID and not thru SYNCSORT) as I had mentioned there.
I am happy with whatever output I am getting with file-aid except the return-code.

And this is a different query by which I wanted to know whether I could change the return-code of batch file-aid.

Thanks,
Arun
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Wed Nov 07, 2007 2:20 pm    Post subject:
Reply with quote

Arun,

Quote:
I could change the return-code of batch file-aid.

No
Back to top
View user's profile Send private message
saravanans4

New User


Joined: 01 Sep 2003
Posts: 26

PostPosted: Mon Dec 08, 2008 3:26 pm    Post subject: You can set zero for empty copy
Reply with quote

Yes you can get RC '0' for empty copy by specifying the below parm in batch file aid

Code:
//STEPNAME EXEC PGM=FILEAID,                                 
//         PARM='OPT=0250100606611121025000005579100'       
//DD01     DD DSN=INPUT.FILE,DISP=SHR               
//DD01O    DD DUMMY                                         
//SYSIN    DD *                                             
$$DD01 COPY                                                 
/*


Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Mon Dec 08, 2008 4:01 pm    Post subject: Reply to: Resetting return code=8 for empty output
Reply with quote

Saravanan,

Quote:
Yes you can get RC '0' for empty copy by specifying the below parm in batch file aid


You are replying to a year old topic. Also please use the code tag while posting codes.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Dec 08, 2008 6:40 pm    Post subject:
Reply with quote

Hi saravanans4,

Code does work but what is this PARM all about:
Code:
PARM='OPT=0250100606611121025000005579100'       
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Dec 09, 2008 5:00 am    Post subject:
Reply with quote

Hi Anuj,

I found this when I googled around
Quote:
The closest thing I can find is a table built during installation. There is a field called BTOPT18 that tells File-Aid what return code to use when a file is empty.

Unfortunately, I can't find and references to how to override this option. The manuals don't have an overall index that I can find, and Compuware didn't create a 'bookshelf' PDF file, just individual books with 8 character names.

--------------------------------------------------------------------------------

There is a parm you can pass to FileAid that will override the first 35 installation defaults, including the 18th one that controls what you need. The bad part is that it overalys all characters starting from the left, so you have to provide the values for the first 17 options as well.

So the execute line needs to look like:

Code:
PGM=FILEAID,PARM='OPT=0250100606611121025000005882104'
Those last two bytes are the return code for an empty file. I tried it and it works. You can put anything from 00 to 99 in there. The other values are the defaults from the manual. In the installation guide, do a find on 'opt=' and you go to the bottom of the list of options.

--------------------------------------------------------------------------------

Well, I have Good News and Bad News. The Good news is that this CAN be overridden. The Bad news is that it is less than straight forward in FileAID.

According to the "File-AID/MVS Installation Guide R8.9" you can modify the Batch FileAID installation options with the following PARM syntax:

Code:
// EXEC PGM=FILEAID,PARM='OPT=????????'
The downside is in the format of those question marks. The following is a summarization of the example in the manual.

The first 5 FileAID Batch options are as follows:

BTOPT01, Displacement 00, Default value 0250, Record Print Default
BTOPT02, Displacement 04, Default value 1, Form Print Default
BTOPT03, Displacement 05, Default value 0, Key Print
BTOPT04, Displacement 06, Default value 06, Batch Buffer Space
BTOPT05, Displacement 08, Default value 06, TSO Buffer Space

In order to override the Batch Buffer Space for example, from it's default value of 06 to 12 the Override would look like this:

Code:
// EXEC PGM=FILEAID,PARM='OPT=02501012'In other words, you have to specifiy ALL the values to the left of the one you are trying to override! Eww Yuk! And to make matters worse, Ed Goodman is correct that the option you want is BTOPT18. So here are the next 13 installation values from the book:

BTOPT06, Displacement 0A, Default Value 6, PRINTER SPACING.
BTOPT07, Displacement 0B, Default Value 1, CHARACTER SET
BTOPT08, Displacement 0C, Default Value 1, TSO PROMPTING.
BTOPT09, Displacement 0D, Default Value 1, ABEND CONTROL.
BTOPT10, Displacement 0E, Default Value 2, DATE FORMATTING.
BTOPT11, Displacement 0F, Default Value 1, MONTH FORMATTING.
BTOPT12, Displacement 10, Default Value 025, I/O ERROR.
BTOPT13, Displacement 13, Default Value 0, UPDATE OPTION.
BTOPT14, Displacement 14, Default Value 0000, UPDATE ACCESS CODE.
BTOPT15, Displacement 18, Default Value 58, PRINT LINES AT 8LPI.
BTOPT16, Displacement 1A, Default Value 82, PRINT LINES AT 12LPI.
BTOPT17, Displacement 1C, Default Value 1, USER FUNCTION.
BTOPT18, Displacement 1D, Default Value 08, NO RECORDS COPIED RETURN CODE.

The manual says "BTOPT18 specifies the return code that File-AID is to issue when records are not selected for copying to any output dataset in a copy operation. The value 08 reflects the current return code issued. Any number from 00 (issue no return code) through 99 is valid. File-AID always reflects the highest return code issued during an execution."

So assuming your shop took all the FileAID installation defaults, in order to change the return code from 08 to 04 your override would look like:

Code:
// EXEC PGM=FILEAID,PARM='OPT=0250100606611121025000005882104'Wow is that ugly or what?





Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Dec 09, 2008 12:07 pm    Post subject:
Reply with quote

oh well..I liked two lines the most from the above text..
Quote:
Eww Yuk!
and
Quote:
Wow is that ugly or what?
.. icon_smile.gif

and yup Thanks Gerry..it was quite a good knowledge but I'll keep a book mark of this topic, 'am sure if I've to imlement this..I would need to look here, I wont be able to rememeber it for sure..

This Day starts with good knowledge..Thanks again.. icon_smile.gif
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am


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