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
 

 

junk values in input field.causes s0c7

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
divate.dilip

New User


Joined: 11 May 2009
Posts: 15
Location: Mumbai

PostPosted: Tue Feb 23, 2010 5:26 pm    Post subject: junk values in input field.causes s0c7
Reply with quote

My input field has junk value in almost all the records, when we run the jcl the job failed with soc7. there is no problem with the program.

How to rectify the input field having junk values and I dont have to touch the records whose field,are not having junk values.

assuming that there are 10000 records.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Feb 23, 2010 5:39 pm    Post subject:
Reply with quote

You need to define rules for calling out something as "JUNK".

Then filter records based on these rules. icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 23, 2010 5:39 pm    Post subject:
Reply with quote

1) I would disagree that there is no problem with the program. Had it been written correctly with the appropriate error handling routines, it would not abend but instead produce an error report.

2) What is supposed to happen to these supposedly "junk" values. We know nothing about what they are and what they should be, and without knowing those facts can not really make any useful suggestions.

3) Do you drop the invalid records or correct them.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Feb 24, 2010 12:21 am    Post subject:
Reply with quote

Just 10000 records?? no problem I prefer to open the file in edit mode and delete the lines which appear as junk icon_biggrin.gif

Long live the RAW power of ISPF icon_pray.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 24, 2010 12:21 am    Post subject:
Reply with quote

Hello,

Quote:
there is no problem with the program.
Opinions vary. . .

If the program is reading data that is not guaranteed to be correct, numeric fields must be validated before use. This code does not, so either the data needs to be re-created or the code fixed.
Back to top
View user's profile Send private message
divate.dilip

New User


Joined: 11 May 2009
Posts: 15
Location: Mumbai

PostPosted: Wed Feb 24, 2010 9:04 am    Post subject: Reply to: junk values in input field.causes soc7
Reply with quote

We are not allowed to touch the program, so there is no chance of validating the field in the program. ( As this is the simplest solution, but I dont need that )

Junk means: my issue is lets assume the field is define as numeric and the input field has all alphabetic values, due to this program fails with soc7.

is there any way that we change a particular field(starts at column 5-9) of the file by replacing it with zeros for all records.

no matter the file is sequential or vsam, any solution is welcome..
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 24, 2010 9:33 am    Post subject:
Reply with quote

Hello,

Quote:
is there any way that we change a particular field(starts at column 5-9) of the file by replacing it with zeros for all records.

Sure, read the file and validate that this field contains a valid numeric value otherwise move zeros to the field. Not acceptable most places as there is no way to know what has been corrupted/discarded. . .
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Wed Feb 24, 2010 10:42 am    Post subject:
Reply with quote

... and please indicate that it was an S0C7, not soc7. This helps when others are searching.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Feb 24, 2010 5:57 pm    Post subject: Re: Reply to: junk values in input field.causes soc7
Reply with quote

divate.dilip wrote:
We are not allowed to touch the program, so there is no chance of validating the field in the program.
Yea, sure.... icon_rolleyes.gif
Quote:
is there any way that we change a particular field(starts at column 5-9) of the file by replacing it with zeros for all records.
Are you asking if there is a utility driven "if not numeric" function?
Back to top
View user's profile Send private message
divate.dilip

New User


Joined: 11 May 2009
Posts: 15
Location: Mumbai

PostPosted: Thu Feb 25, 2010 8:52 am    Post subject: Reply to: junk values in input field.causes s0c7
Reply with quote

The input field is having alphabetic value I want to change it to numeric, if it can be done by utility also its fine.

As this has to be done to so many records, if its one or two its adjusted by deleting the records, but the records are huge, and we dont want to job to fail again due to that field only in the production again.

* All the records has to be updated at once for the field, no matter how u do it( without touching the program), in JCL if we introduce new step to validate that field would be fine.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 25, 2010 9:46 am    Post subject:
Reply with quote

Hello,

Suggest someone correct the process that creates the problem file so that all of the numeric fields have valid numeric data.

If it is ok to add another step, it would take about 15 minutes to implement a cobol program that would copy the file changing any "bad" values to zeros.

If it acceptable to simply throw away the field (i cannot imagine why this might be acceptable) and fill it with zeros, this can be done with the sort product used on the system.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Feb 25, 2010 4:48 pm    Post subject:
Reply with quote

Hi,

This is what puzzles me:

You say the numeric field at pos 5-9 contains alpha chars. Assuming the field has a legitimate business function, what kinds of values SHOULD it contain?

Wouldn't moving zeros there produce false/inaccurate results for the business process?

As Dick suggested, shouldn't the logic of the feeding program be checked to assure that substituting zeros for the alpha chars will do no harm and not produce misleading/inaccurate data?
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 8 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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