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
 

 

Write each format in a new line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Mon May 17, 2010 7:07 pm    Post subject: Write each format in a new line
Reply with quote

Hi all,

I am working on some tutorials of SYNCSORT.

I am looking in to all the dates and time formats supported by SYNCSORT.

Presently I am using the following code (X) to introduce 2spaces between each format.

Code:
SORT FIELDS=COPY                                     
OUTREC FIELDS=(1,6,X,DATE1,2X,TIME1,2X,DATE2,2X,DATE3)


I want to write each format in a different line..As a different record in the SORTOUT file.

Also while using this I cannot have a empty SORTIN file and hence I have to give some random record.Can this be avoided?
Back to top
View user's profile Send private message

Escapa

Senior Member


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

PostPosted: Mon May 17, 2010 8:31 pm    Post subject:
Reply with quote

show the required output and input you are using.
what is RECFM\LRECL of input\output files.
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: Mon May 17, 2010 9:39 pm    Post subject:
Reply with quote

Hello,

Not tested, but instead of 2X try / . . .
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Tue May 18, 2010 11:01 am    Post subject:
Reply with quote

Sambhaji,

No I/P file being used. I have just added a dummy record 123456 in the SORTIN DD card statement.

O/P is SYSOUT

Dick,

I had already tried '/' but even that is not working. I get syntax error at that point.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue May 18, 2010 11:13 am    Post subject:
Reply with quote

Hi,

you should post all job output to get better response, the problem is you cannot use the '/' with OUTREC.

Try this
Code:
//SORT0001 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
123456                                                   
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                         
 SORT FIELDS=COPY                                       
 OUTFIL BUILD=(1,6,/,DATE1,/,TIME1,/,DATE2,/,DATE3)     
/*


Gerry
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Tue May 18, 2010 12:03 pm    Post subject:
Reply with quote

Thanks,

This is working fine
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Tue May 18, 2010 12:59 pm    Post subject:
Reply with quote

Sorry, to continue on this topic....

This time I am using an input file
Code:
Organization  . . . : PS
Record format . . . : FB
Record length . . . : 80
Block size  . . . . : 800


And an output file
Code:
Organization  . . . : PS
Record format . . . : FB
Record length . . . : 80
Block size  . . . . : 800


with the contents of Input file as
Code:
----+----1----+----2----+----3
DATE          :                   
DATE1         :                   
DATE1(-)      :                   
DATE2         :                   
DATE2(-)      :                   
DATE3         :                   
DATE4         :                   
DATE(DMY-)    :                   
DATE(DM4-)    :                   
DATENS=(4DM)  :                   


How do I code in the JCL using SYNCSORT in which I get output as
Code:
----+----1----+----2----+----3----+----4
DATE          : 05/18/10               
DATE1         : 20100518               
DATE1(-)      : 2010-05-18             
DATE2         : 201005                 
DATE2(-)      : 2010-05                 
DATE3         : 2010138                 
DATE4         : 2010-05-18-03.21.52     
DATE(DMY-)    : 18-05-10               
DATE(DM4-)    : 18-05-2010             
DATENS=(4DM)  : 20101805               



Also I tried out
Code:
SORT FIELDS=COPY                                                       
OUTFIL BUILD=(1,17,2X,DATE,/,                                         *
              1,17,2X,DATE1,1/,                                       *
              1,17,2X,DATE1(-),1/,                                    *
              1,17,2X,DATE2,1/,                                       *
              1,17,2X,DATE2(-),1/,                                    *
              1,17,2X,DATE3,1/,                                       *
              1,17,2X,DATE4,1/,                                       *
              1,17,2X,DATE(DMY-),1/,                                  *
              1,17,2X,DATE(DM4-),1/,                                  *
              1,17,2X,DATENS=(4DM))                                   

But somewhere I am going wrong and i get
Code:
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=   800     
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=   800     
WER247A  SORTOUT  HAS INCOMPATIBLE LRECL                         
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: Tue May 18, 2010 7:24 pm    Post subject:
Reply with quote

Hello,

Change SORTOUT to a proper lrecl or force the data to be 80 . . .
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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