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

Build a record in output file and repeat for 30 times


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sruthi J

New User


Joined: 07 Jul 2023
Posts: 9
Location: India

PostPosted: Mon Jul 10, 2023 4:27 pm
Reply with quote

I have no data in the input file, I need to build the output data as hard-coded records in the output file and the same inserted record needs to be repeated for 30 times.

Example data looks like:
Input : no data.its a dummy file
Output: file
Xxxxxyyyyyzzzz01
Xxxxxyyyyyzzzz01
Xxxxxyyyyyzzzz01
And the records to be repeated till 30 times.

I have tried the below syntax,but it's not working.

Sort fields=copy
Outrec build=(1:C'Xxxxxyyyyzzzx01'), Repeat=30
But the above is not working.

Please help on this if anyone has Idea on this?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Mon Jul 10, 2023 4:38 pm
Reply with quote

REPEAT works in OUTFIL, but not OUTREC. See SORT manual.
Back to top
View user's profile Send private message
Sruthi J

New User


Joined: 07 Jul 2023
Posts: 9
Location: India

PostPosted: Mon Jul 10, 2023 4:42 pm
Reply with quote

Okay..

Then how can I Repeat the record which I am trying to build in Outrec ?
Back to top
View user's profile Send private message
Sruthi J

New User


Joined: 07 Jul 2023
Posts: 9
Location: India

PostPosted: Mon Jul 10, 2023 4:43 pm
Reply with quote

Could you please help with the syntax if you have idea?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Mon Jul 10, 2023 5:52 pm
Reply with quote

The following will repeat the first record 30 times.

Code:
OPTION COPY,STOPAFT=1               
OUTREC BUILD=(1:C'XXXXXYYYYZZZX01')
OUTFIL REPEAT=30                   
END
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Mon Jul 10, 2023 10:30 pm
Reply with quote

Sruthi J wrote:
I have no data in the input file, I need to build the output data as hard-coded records in the output file and the same inserted record needs to be repeated for 30 times.

Example data looks like:
Input : no data.its a dummy file
Output: file
Xxxxxyyyyyzzzz01
Xxxxxyyyyyzzzz01
Xxxxxyyyyyzzzz01
And the records to be repeated till 30 times.

I have tried the below syntax,but it's not working.

Sort fields=copy
Outrec build=(1:C'Xxxxxyyyyzzzx01'), Repeat=30
But the above is not working.

Please help on this if anyone has Idea on this?


It is not good idea: to repeat the same unanswered question more than once, without adding any previously unclear details.

This is also prohibited by the forum rules.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Mon Jul 10, 2023 10:35 pm
Reply with quote

Sruthi J wrote:

But the above is not working.

In this case you MUST present here the exact copy of the error message you get.

In 90-95% of all cases, the message text would say exactly what you can read at this forum!

I guess it should be much easier, and much faster, just trying to read the error message text, rather than waiting for exactly the same answer from the forum!
Back to top
View user's profile Send private message
Sruthi J

New User


Joined: 07 Jul 2023
Posts: 9
Location: India

PostPosted: Mon Jul 10, 2023 10:36 pm
Reply with quote

tred the above syntax,but output file is showing empty. No record is populated in the output
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Mon Jul 10, 2023 10:38 pm
Reply with quote

Sruthi J wrote:
tred the above syntax,but output file is showing empty. No record is populated in the output

I have my doubts, I always test my results before posting.
Code:
ICE054I 0 RECORDS - IN: 1, OUT: 1                       
ICE227I 0 SORTOUT  : DELETED = 0, REPORT = 0, DATA = 30 
ICE228I 0 SORTOUT  : TOTAL IN = 1, TOTAL OUT = 30

Please show your JCL and Output.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Mon Jul 10, 2023 10:40 pm
Reply with quote

Sruthi J wrote:
tred the above syntax,but output file is showing empty. No record is populated in the output

When the message says: SYNTAX ERROR, you MUST read, and re-read the manual carefully. This is exactly your own job, which you are paid for. Do not assume that others must do your own job.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Mon Jul 10, 2023 10:45 pm
Reply with quote

Joerg.Findeisen wrote:

Please show your JCL and Output.


I am 99% sure the answer will be: "It is a Top Secret information" 824.gif 36_11_6.gif 12.gif

My opinion is: a person who is not able to fix a primitive syntax error, should not be allowed for any restricted access, anywhere, under any circumstances.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Wed Jul 12, 2023 12:07 pm
Reply with quote

sergeyken wrote:
I am 99% sure the answer will be: "It is a Top Secret information" 824.gif 36_11_6.gif 12.gif

I opt for the remaining 1%, no answer at all.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top