conversion by using SORT

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
Karthik12
Member
Posts: 8
Joined: Thu Jun 19, 2008 2:51 pm

conversion by using SORT

Post by Karthik12 » Wed Jul 02, 2008 2:18 pm

The following line is showing the syntax error while submitting the jcl

43,3,PD,TRAN=ALTSEQ,EDIT=(ST.TTTT),SIGNS=(,-),C'|',3X

Can you pls tell whether the code is right? If not, what is the remedy?

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Jul 02, 2008 2:30 pm

no it is not correct if you are getting a syntax error.

had you bothered to provide us with both lines (the one you provided and the next line in the spool, which indicates where the syntax error is (column).

remedy is correct your syntax error
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Karthik12
Member
Posts: 8
Joined: Thu Jun 19, 2008 2:51 pm

Post by Karthik12 » Wed Jul 02, 2008 2:43 pm

ok... can u tell me the output if the sort card has ALTSEQ code = (7C6F)?

Karthik12
Member
Posts: 8
Joined: Thu Jun 19, 2008 2:51 pm

Post by Karthik12 » Wed Jul 02, 2008 5:02 pm

We have the following scenario:
Input file: contains value unloaded from a table. The given column is of the format: Packed decimal(Comp-3) values and a Nullable field.

Input File format:

7994052604901996-03-08-12.45.52.938604 ..?...?
7994061415221996-01-05-20.15.42.822969S....?..
7994091513521996-01-05-20.14.48.121947S....?..
7994091708891996-07-31-09.37.24.992121 ..?...?

In this, the columns 40 to 42 and 43 to 46 should be converted to a readable format.
These two fields' format : Small Int(length:2 - Nullable field) and Decimal(length:5,4 - Nullable field).

The requirment is, the values from 40 - 46 should be converted to a readable format with the null values represented using special character (&).

The output should look something like:

799405260490|1996-03-08-12.45.52.938604| |&&&&|&.&&&&| --> where "&" is the special character representing the Null values available in the input file. "|" is the delimiter between the columns.

799405260490|1996-03-08-12.45.52.938604|S|1111|1.0444| --> where the 1111|1.0444 represents proper values available in the column.


Kindly let us know the DFsort procedure which caters to the above requirement. [/img]

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Jul 02, 2008 9:28 pm

The syntax error you received would be as follows:

Code: Select all

            INREC BUILD=(43,3,PD,TRAN=ALTSEQ,EDIT=(ST.TTTT),SIGNS=(,-),C'|',3X)
                                 $                                             
ICE007A E SYNTAX ERROR                                                         
You have a couple of different items intermixed. You can have:

43,3,TRAN=ALTSEQ

and you can have:

43,3,PD,EDIT=(ST.TTTT),SIGNS=(,-)


but you can't intermix these two as you've done.

I can't really tell from your description what you're trying to do. I don't know what you mean by
These two fields' format : Small Int(length:2 - Nullable field) and Decimal(length:5,4 - Nullable field).
Please show what your input looks like in hexadecimal.

Also, explain the "rules" for getting from your input values to your output values, and exactly what you mean by the following in terms of the hexadecimal display of this field
The requirment is, the values from 40 - 46 should be converted to a readable format with the null values represented using special character (&).
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

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