Sort or DFSORT - find all those fields and replace with 0

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Sort or DFSORT - find all those fields and replace with 0

Post by Vikas.betu » Fri Apr 04, 2014 9:07 pm

Hello Guys
I have a vsam file in which I have some invalid fields for some of the records, however I am not sure about the values of those fields(defined in PS format). I am extracting that file into flat file. but while doing extraction I want to find all those fields and replace with 0 or spaces.
Can anyone help me to do this by providing code for this.

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sat Apr 05, 2014 12:47 pm

It is unclear as to which sort product you are using as your title begins "Sort or DFSort...". Please read the messages from one of your sort steps and come back with the product name.
Regards
Nic

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Apr 06, 2014 5:31 am

What is invalid to you? I suspect that different kinds of fields have different valid/invalid values. . . .
Have a good one

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Mon Apr 07, 2014 6:25 pm

I have a VSAM file in which a field is defined as a character field and then it got redefined in PS field. When I am trying to extract that field in flat file, it is throwing SOC7 error as there are some value which are not numeric So I just want to remove those values. Those values can be different,

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Mon Apr 07, 2014 8:38 pm

What is a "PS field"? Whatever, when it was redefined a conversion program should have been riun to convert the data from the old format to the new format. And a S0C7 was not "thrown". DFSort, Rexx, Pl/1, COBOL etcs do not "throw" errors - they abend or fail with an S0C7 or whatever. Throw is for "curly-wurlt" languages i.e. those that use {} and throw and catch exceptions (note: not errors).
Regards
Nic

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Mon Apr 07, 2014 8:46 pm

PS is packed decimal field. there are some alpha numeric values in that column. I want to use it through DFSORT. Just need your help in this

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Mon Apr 07, 2014 9:55 pm

You are going to need to post some fo the values in hex and then explain what to do with the different values in the field(s).

Your description does not use "normal" terminology. This is terminology that has come into use in your organization?

What you is completely clear to you, but it is not to the rest of us. Someone might make a lucky guess, but it is better for the info to be posted.
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others