The UltraEdit macro language does not support variables. So you can't use GotoLine with a variable line number loaded from a different file. You can specify the line number on the command line of uedit32.exe when opening a file - see in help of UltraEdit the topic "Command Line Parameters". Maybe this will help you.
If you want to solve your problem with a macro, you have to temporary edit file#2 to go to the line you want. Here is the macro which goes to the line which number (as string) is currently in the clipboard. You can develop the part to copy the line number from file#1 to clipboard by yourself.
How it works:
It inserts at every line with the insert number feature of the column mode the line number and a separator string. Then it goes to the line specified in the current clipboard, modifies the inserted separator string of this line, removes all line numbers and the separator string and goes again to the special marked line where it deletes the mark. Awful, but it works. You can use a different separator string than #!##! and a different special mark string than !#!!# if you don't like these strings or the could exist in your file#2.
Don't forget to enable the macro property Continue if a Find with Replace not found.
InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
ColumnModeOn
SelectToBottom
StartSelect
Key HOME
"#!##!"
EndSelect
Top
ColumnInsertNum 1 1 LeadingZero
ColumnModeOff
Find "^c#!##!"
IfFound
"!#!!#"
EndIf
Top
Find RegExp "%[0-9]+#!##!"
Replace All ""
Find "!#!!#"
IfFound
Delete
EndIf UnixReOn
Remove the last red command, if you use regular expression in UltraEdit style by default instead of Unix style.
For UltraEdit v11.10c and lower see Advanced - Configuration - Find - Unix style Regular Expressions.
For UltraEdit v11.20 and higher see Advanced - Configuration - Searching - Unix style Regular Expressions.
Macro commands UnixReOn/UnixReOff modifies this setting.
Best regards from an UC/UE/UES for Windows user from Austria