IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort card to replace text using cross reference file


IBM Mainframe Forums -> SYNCSORT
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 88
Location: India

PostPosted: Thu Sep 22, 2016 2:32 pm
Reply with quote

And the JCL, please?!

Edit: Aah, the things *SORT does icon_smile.gif

Refer this link, it has precisely what you need: ibmmainframes.com/about60103.html
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Sep 22, 2016 5:05 pm
Reply with quote

Show us the JCL for DDname F1ONLY.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Sep 22, 2016 5:25 pm
Reply with quote

Susanta - You might want to use IFOUTLEN to limit the output record length like this.
Code:
OUTFIL FNAMES=F1ONLY,IFOUTLEN=90,
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 126
Location: India

PostPosted: Thu Sep 22, 2016 5:29 pm
Reply with quote

HI..

i have another need where f1 file is of VB format.

and F2 is still of FB format.

what changes required for the bewlo card for this scenario.
could you please help.

Code:
JOINKEYS FILE=F1,FIELDS=(11,14,CH,A)             
 JOINKEYS FILE=F2,FIELDS=(2,14,CH,A)               
 JOIN UNPAIRED,F1                                 
 REFORMAT FIELDS=(F1:1,90,F2:1,55),FILL=C'$'       
 SORT FIELDS=(1,10,ZD,A)                           
                                                   
 OUTFIL FNAMES=F1ONLY,                             
 IFTHEN=(WHEN=(1,1,CH,NE,C'$',AND,91,1,CH,EQ,C'$'),
        BUILD=(1,90)),                             
 IFTHEN=(WHEN=(1,1,CH,NE,C'$',AND,91,1,CH,NE,C'$'),
        BUILD=(1,10,106,14,25,64))                 

Back to top
View user's profile Send private message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 88
Location: India

PostPosted: Thu Sep 22, 2016 5:42 pm
Reply with quote

Hello NicC, the problem will keep coming unless the length is handled explicitly as tested by Pandora/Mr. Woodgar in the earlier tagged post; at least for SYNCSORT.

Aside, Susanta, for a VB dataset, you add 4 to the already specified start-of-data positions; for example, from: FIELDS=(11,14,CH,A) , 11 changes to 15; from FIELDS=(2,14,CH,A), 2 changes to 6; and so on. Play around with it a bit, and you should be able to work it out. There are hundreds of examples for this available on the forum as well as the good ol' web (if the manual is not around).

Do confirm if the information from the link shared and stated by Mr. Raj a few posts earlier was helpful in to resolving the issue, because your last sort-card doesn't show any changes.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Sep 22, 2016 5:46 pm
Reply with quote

Are all other issues solved now? If VB is the only thing troubling you, you should be able to figure it out yourself. There are plenty of working examples here showing what needs to be done for handling VB datasets.

Next time when you start a new topic, try to post as much information as possible in your very first post instead of throwing it in bits. That would make it easier for others who are trying to help you.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Sep 22, 2016 6:59 pm
Reply with quote

If the REFORMAT is variable, the OUTFIL must be variable or have VTOF/CONVERT.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Sep 22, 2016 8:27 pm
Reply with quote

Susanta, Please take sometime and freeze your need once for all and then do some research by yourself to learn and get things done independently. Because if you are a Beginner to DFSORT/SYNCSORT then the right place to post your question and learn is here.
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 126
Location: India

PostPosted: Fri Sep 23, 2016 5:26 pm
Reply with quote

HI..
The ifoutlen syntax worked .
Code:
OUTFIL FNAMES=F1ONLY,IFOUTLEN=90,

Now code for F1/f2 as FB format working for me.

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Sep 23, 2016 9:02 pm
Reply with quote

I don't know why I thought the REFORMAT was variable :-)

In your first BUILD, you have 90 bytes of data, in the second 88. That's the reason for the failure. You could add 2X to the end of the second BUILD, or, perhaps less clear, use the IFOUTLEN as you have.
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 126
Location: India

PostPosted: Sun Sep 25, 2016 4:34 pm
Reply with quote

Hi...

I am facing issue with F1 (VB file with len 80) and F2 (FB file of len 55).
getting abend..
IEF450I TXXXYY03 PS080 JS010 - ABEND=S000 U0016 REASON=00000000


The card is ..


Code:
SYNCSORT FOR Z/OS  2.1.1.1R    U.S. PATENTS: 4210961, 5117495   (C) 2014 SYNCSO
                                                      z/OS   2.1.0             
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 19D64, MODEL 2827 718             LICEN
SYSIN :                                                                       
 JOINKEYS FILE=F1,FIELDS=(15,14,CH,A)                                         
 JOINKEYS FILE=F2,FIELDS=(2,14,CH,A)                                           
 JOIN UNPAIRED,F1                                                             
 REFORMAT FIELDS=(F1:1,4,5,86,F2:1,55),FILL=C'$'                               
 SORT FIELDS=(5,10,ZD,A)                                                       
                                                                               
 OUTFIL FNAMES=F1ONLY,IFOUTLEN=80,                                             
 IFTHEN=(WHEN=(5,1,CH,NE,C'$',AND,91,1,CH,EQ,C'$'),                           
        BUILD=(1,4,15,76)),                                                   
 IFTHEN=(WHEN=(5,1,CH,NE,C'$',AND,91,1,CH,NE,C'$'),                           
        BUILD=(1,4,106,14,29,62))                                             
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                 
WER164B  17,736K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER164B     0 BYTES RESERVE REQUESTED, 416K BYTES USED                         
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER481I  JOINKEYS REFORMAT RECORD LENGTH=  145, TYPE = F                       
WER202A  F1ONLY   RECFM INCOMPATIBLE                                           
WER110I  F1ONLY   : RECFM=VB   ; LRECL=    80; BLKSIZE=                       
WER074I  F1ONLY   : DSNAME=TXX.XX.XXXXX.TEST.VB.V2                       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER482I  JNF1 STATISTICS                                                       
WER483B  1,956K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER483B     0 BYTES RESERVE REQUESTED, 476K BYTES USED                         
WER108I  SORTJNF1 : RECFM=VB   ; LRECL=    80; BLKSIZE= 27998                 
WER073I  SORTJNF1 : DSNAME=XXX.XXXX.XXXXX.XXXX.VB.V1                       
WER482I  JNF2 STATISTICS                                                       
WER483B  1,956K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER483B     0 BYTES RESERVE REQUESTED, 476K BYTES USED                         
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    55; BLKSIZE=  5500                 
WER073I  SORTJNF2 : DSNAME=TXX.XX.XREF.FILE




In this same step JNF1CNTL is used to add SEQNUM of 10 bytes to file
XXX.XXXX.XXXXX.XXXX.VB.V1

The card is ..
Code:
   INREC FIELDS=(1:1,4,5:SEQNUM,10,ZD,15:5,76) 


Could you please help.
Thnaks,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sun Sep 25, 2016 5:30 pm
Reply with quote

topic locked,
when a topic does not reach a conclusion after 30 posts
it means that everybody is wasting his time.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Sep 25, 2016 8:31 pm
Reply with quote

I haven't checked, but I think Arun Raj suggested using the match-marker (?) in your REFORMAT statement, which will simplify things.

You have now made you output file, F1ONLY, variable-length, with a fixed-length REFORMAT. So you have "incompatible".

If you continue to have problems, start a new quesiton.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top