Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Question related to Data dictionary feature

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
rexx77

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Thu Aug 31, 2017 7:23 am    Post subject: Question related to Data dictionary feature
Reply with quote

Hi Folks,

I am trying to use SYNCSORT Data dictionary feature , as my upstream files are created with meta attributes information . I am trying to extract the required fields using the column names available in SYMNAMES DD.

SYMNAMES Definition:
Code:

Asset_name,1,50,CH
Field1,51,32,ZD
Field2,*,5000,CH
Field3,*,10,CH


Sort statement is like below:
Code:

SORT FIELDS =(Asset name, A)
OUTREC FIELDS=(Asset_Name, 10X, Field1,10X,Field2,Field3)


1. Field 1 in input file is 32 length and ZD format, i want to convert that to 14 Packed decimal in the output. Do you know how to specify the conversion while mentioning the outrec fields
2. Field2 is around 5000 length and CHAR field. I want to extract first 100 characters from this field. How to do this?

Appreciate your inputs.
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 379
Location: Maryland

PostPosted: Thu Aug 31, 2017 7:02 pm    Post subject:
Reply with quote

Answer to 1.
After RTFM (did you read it?) it's getting clear that field format is converted (from ZD to PD) as
Code:
 FIELDS=(.....51,32,ZD,PD[,LENGTH=nn],.......)

Same thing with dictionary name(s)
Code:
 FIELDS=(.....Field1,PD[,LENGTH=nn],.......)
Back to top
View user's profile Send private message
rexx77

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Thu Aug 31, 2017 8:04 pm    Post subject:
Reply with quote

I added Length field as suggested , Here is my modified SORT statement

Code:

Field1,PD(,LENGTH=14),


It was substituted as below, during run time.

Code:


12,32,PD(,LENGTH=14)



I got SYNTAX error.

WER271A OUTREC STATEMENT : NUMERIC FIELD ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 379
Location: Maryland

PostPosted: Thu Aug 31, 2017 10:06 pm    Post subject:
Reply with quote

Correct syntax looks like this (copied from the manual)
Code:
 OUTREC FIELDS=(1,10,ZD,PD,
                11,4,FI,ZD,LENGTH=8)

Please RTFM carefully

My square brackets used to specify the "optional parameter LENGTH", but not to be replaced with regular parenthesis! icon_axe.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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts REFORMATTING WITH JFY CLOBBERING OUTP... speermb DFSORT/ICETOOL 12 Thu Nov 08, 2018 7:20 pm
No new posts Migrating AS400 to HIVE; Data type ma... sindhu.jose All Other Mainframe Topics 1 Tue Nov 06, 2018 1:06 pm
No new posts Silly question maybe - REPLACE member... Cloink TSO/ISPF 15 Thu Oct 25, 2018 6:38 pm
No new posts Can records in IMS/DB be related usin... SRICOBSAS IMS DB/DC 2 Fri Oct 19, 2018 3:53 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us